From: Todd C. Miller Date: Wed, 26 Mar 2014 17:09:57 +0000 (-0600) Subject: Fix warning on systems where mode_t is not unsigned int (Solaris). X-Git-Tag: SUDO_1_8_11^2~248 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2dfc10830c92de5d9a853b98fc1989035ed9ae61;p=sudo Fix warning on systems where mode_t is not unsigned int (Solaris). --- diff --git a/plugins/sudoers/timestamp.c b/plugins/sudoers/timestamp.c index e005628d4..021eb7e0f 100644 --- a/plugins/sudoers/timestamp.c +++ b/plugins/sudoers/timestamp.c @@ -217,7 +217,7 @@ ts_mkdirs(char *path, uid_t owner, mode_t mode, mode_t parent_mode, bool quiet) *slash = '\0'; if (stat(path, &sb) != 0) { sudo_debug_printf(SUDO_DEBUG_DEBUG|SUDO_DEBUG_LINENO, - "mkdir %s, mode 0%o", path, parent_mode); + "mkdir %s, mode 0%o", path, (unsigned int) parent_mode); if (mkdir(path, parent_mode) != 0) { if (!quiet) warning(U_("unable to mkdir %s"), path); @@ -238,7 +238,7 @@ ts_mkdirs(char *path, uid_t owner, mode_t mode, mode_t parent_mode, bool quiet) } /* Create final path component. */ sudo_debug_printf(SUDO_DEBUG_DEBUG|SUDO_DEBUG_LINENO, - "mkdir %s, mode 0%o", path, mode); + "mkdir %s, mode 0%o", path, (unsigned int) mode); if (mkdir(path, mode) != 0 && errno != EEXIST) { if (!quiet) warning(U_("unable to mkdir %s"), path);