diff options
author | Gerald Carter <jerry@samba.org> | 2005-11-28 15:56:10 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2005-11-28 15:56:10 +0000 |
commit | 2e670e20f9994978c12b6b4a7726d79186f7e20a (patch) | |
tree | 175d68239a1cf2a700aa27438d24d6f5ec32db1d /examples/perfcounter | |
parent | 73720eb6306bb52a66e36a06387d3c24ef6043eb (diff) | |
download | samba-2e670e20f9994978c12b6b4a7726d79186f7e20a.tar.gz samba-2e670e20f9994978c12b6b4a7726d79186f7e20a.tar.xz samba-2e670e20f9994978c12b6b4a7726d79186f7e20a.zip |
r11942: patch from Marcin to fix the mkdir() in perfcount daemon
Diffstat (limited to 'examples/perfcounter')
-rw-r--r-- | examples/perfcounter/perf_writer_util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/perfcounter/perf_writer_util.c b/examples/perfcounter/perf_writer_util.c index bb6422bac23..78a99fef494 100644 --- a/examples/perfcounter/perf_writer_util.c +++ b/examples/perfcounter/perf_writer_util.c @@ -77,7 +77,7 @@ void usage(char *progname) fprintf(stderr, "Usage: %s [-d] [-f <file_path>].\n", progname); fprintf(stderr, "\t-d: run as a daemon.\n"); fprintf(stderr, "\t-f <file_path>: path where the TDB files reside.\n"); - fprintf(stderr, "\t\tDEFAULT is /tmp/counters\n"); + fprintf(stderr, "\t\tDEFAULT is /var/lib/samba/perfmon\n"); exit(1); } @@ -116,13 +116,13 @@ void setup_file_paths(RuntimeSettings *rt) if(strlen(rt->dbDir) == 0) { /* No file path was passed in, use default */ - sprintf(rt->dbDir, "/tmp/counters"); + sprintf(rt->dbDir, "/var/lib/samba/perfmon"); } sprintf(rt->nameFile, "%s/names.tdb", rt->dbDir); sprintf(rt->counterFile, "%s/data.tdb", rt->dbDir); - mkdir(rt->dbDir, O_RDWR); + mkdir(rt->dbDir, 0755); rt->cnames = tdb_open(rt->nameFile, 0, TDB_CLEAR_IF_FIRST, O_RDWR | O_CREAT, 0644); rt->cdata = tdb_open(rt->counterFile, 0, TDB_CLEAR_IF_FIRST, O_RDWR | O_CREAT, 0644); |