From: Emmanuel Roullit Date: Fri, 5 Apr 2019 08:46:06 +0000 (+0200) Subject: log: output file mode in octal on chmod warning X-Git-Tag: suricata-5.0.0-beta1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b75e69165be3a0b0f2621e20ffbed67e58ed439;p=thirdparty%2Fsuricata.git log: output file mode in octal on chmod warning 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 --- diff --git a/src/util-logopenfile.c b/src/util-logopenfile.c index bef3a11dbd..8eea87ab2c 100644 --- a/src/util-logopenfile.c +++ b/src/util-logopenfile.c @@ -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)); } }