]> granicus.if.org Git - sudo/commitdiff
cast mode_t to unsigned int when printing with %o
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 22 Mar 2017 14:37:12 +0000 (08:37 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 22 Mar 2017 14:37:12 +0000 (08:37 -0600)
plugins/sudoers/iolog.c
plugins/sudoers/timestamp.c

index 924fa88a9b5e1a0e5c68fef1c6b91cd47c909973..d3a11ae2598bf2d7576edc16a2a2b9a9dd22b614 100644 (file)
@@ -167,7 +167,7 @@ io_mkdtemp(char *path)
            ignore_result(chown(path, iolog_uid, iolog_gid));
            if (chmod(path, iolog_dirmode) != 0) {
                sudo_warn(U_("unable to change mode of %s to 0%o"),
-                   path, iolog_dirmode);
+                   path, (unsigned int)iolog_dirmode);
            }
        }
     }
index f0a21a5a35320c8b3d8e4c5a3b03d705221e7a7c..34600f84a0c867c74d741686261fccdbcf143669 100644 (file)
@@ -163,7 +163,7 @@ ts_mkdirs(char *path, uid_t owner, gid_t group, mode_t mode,
     if (ret) {
        /* Create final path component. */
        sudo_debug_printf(SUDO_DEBUG_DEBUG|SUDO_DEBUG_LINENO,
-           "mkdir %s, mode 0%o, uid %d, gid %d", path, (int)mode,
+           "mkdir %s, mode 0%o, uid %d, gid %d", path, (unsigned int)mode,
            (int)owner, (int)group);
        if (mkdir(path, mode) != 0 && errno != EEXIST) {
            if (!quiet)