]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
log: output file mode in octal on chmod warning
authorEmmanuel Roullit <emmanuel.roullit@cognitix.de>
Fri, 5 Apr 2019 08:46:06 +0000 (10:46 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 8 Apr 2019 10:13:02 +0000 (12:13 +0200)
The mode input in chmod is an octal integer. However when the warning is logged,
the file mode is printed in decimal which is confusing.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@cognitix.de>
src/util-logopenfile.c

index bef3a11dbd8c4b85366de52167e67c261cb225b3..8eea87ab2c5f243449ac563ab602b037e95e75f6 100644 (file)
@@ -283,7 +283,7 @@ SCLogOpenFileFp(const char *path, const char *append_setting, uint32_t mode)
         if (mode != 0) {
             int r = chmod(filename, mode);
             if (r < 0) {
-                SCLogWarning(SC_WARN_CHMOD, "Could not chmod %s to %u: %s",
+                SCLogWarning(SC_WARN_CHMOD, "Could not chmod %s to %o: %s",
                              filename, mode, strerror(errno));
             }
         }