diff options
author | Gerald Carter <jerry@samba.org> | 2005-11-28 15:56:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:38 -0500 |
commit | 3e05e88bb6c0618ecc460045b72d86e82929af01 (patch) | |
tree | 175d68239a1cf2a700aa27438d24d6f5ec32db1d | |
parent | 0981552deab9f73d2f784e5da52878ffdf845031 (diff) | |
download | samba-3e05e88bb6c0618ecc460045b72d86e82929af01.tar.gz |
r11942: patch from Marcin to fix the mkdir() in perfcount daemon
-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); |