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 <emmanuel.roullit@cognitix.de>
pull/3783/head
Emmanuel Roullit 7 years ago committed by Victor Julien
parent 8e464530ef
commit 8b75e69165

@ -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));
}
}

Loading…
Cancel
Save