]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Restrict -R usage to when -B (and -b) are set.
authorJoris de Vries <joris@apptrician.nl>
Mon, 14 Oct 2013 10:58:12 +0000 (12:58 +0200)
committerJoris de Vries <joris@apptrician.nl>
Mon, 14 Oct 2013 10:58:12 +0000 (12:58 +0200)
src/rrd_daemon.c

index d9f63e7b3c0f1e456c9eb34bba7b6fba7145ffce..246d9179d4a257dc0ce5a0a46c20ccd5a188f909 100644 (file)
@@ -3684,6 +3684,7 @@ static int read_options (int argc, char **argv) /* {{{ */
             "  -p <file>     Location of the PID-file.\n"
             "  -b <dir>      Base directory to change to.\n"
             "  -B            Restrict file access to paths within -b <dir>\n"
+            "  -R            Allow recursive directory creation within -b <dir>\n"
             "  -g            Do not fork and run in the foreground.\n"
             "  -j <dir>      Directory in which to create the journal files.\n"
             "  -F            Always flush all updates at shutdown\n"
@@ -3720,6 +3721,10 @@ static int read_options (int argc, char **argv) /* {{{ */
     fprintf(stderr, "WARNING: -B does not make sense without -b!\n"
             "  Consult the rrdcached documentation\n");
 
+  if (config_allow_recursive_mkdir && !config_write_base_only)
+      fprintf(stderr, "WARNING: -R does not make sense without -B!\n"
+              "  Consult the rrdcached documentation\n");
+
   if (journal_dir == NULL)
     config_flush_at_shutdown = 1;