summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-11-28 15:56:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:38 -0500
commit7b3d349251be63e0c707a82aebb950f67a2df3a9 (patch)
tree95a2aae526710dd42910c5eea3141698bdb79f35 /examples
parentba54ba03262e851ddbecfdfc160a25a692b078e2 (diff)
downloadsamba-7b3d349251be63e0c707a82aebb950f67a2df3a9.tar.gz
samba-7b3d349251be63e0c707a82aebb950f67a2df3a9.tar.bz2
samba-7b3d349251be63e0c707a82aebb950f67a2df3a9.zip
r11942: patch from Marcin to fix the mkdir() in perfcount daemon
(This used to be commit 3e05e88bb6c0618ecc460045b72d86e82929af01)
Diffstat (limited to 'examples')
-rw-r--r--examples/perfcounter/perf_writer_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/perfcounter/perf_writer_util.c b/examples/perfcounter/perf_writer_util.c
index bb6422bac2..78a99fef49 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);