From 8b75e69165be3a0b0f2621e20ffbed67e58ed439 Mon Sep 17 00:00:00 2001 From: Emmanuel Roullit Date: Fri, 5 Apr 2019 10:46:06 +0200 Subject: [PATCH] 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 --- src/util-logopenfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); } }