]> granicus.if.org Git - sudo/commitdiff
Fix compiler warning on systems where mode_t is not unsigned int,
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 2 Mar 2015 20:58:45 +0000 (13:58 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 2 Mar 2015 20:58:45 +0000 (13:58 -0700)
such as 32-bit Solaris.

plugins/sudoers/visudo.c

index 1c54897c49043a7d4b86e0e6ee1d1284d9e7acff..4a27a373197866f3989fa040d15c695ec30bbd34 100644 (file)
@@ -620,7 +620,7 @@ install_sudoers(struct sudoersfile *sp, bool oldperms)
        }
        if (chmod(sp->tpath, sudoers_mode) != 0) {
            sudo_warn(U_("unable to change mode of %s to 0%o"), sp->tpath,
-               sudoers_mode);
+               (unsigned int)sudoers_mode);
            goto done;
        }
     }
@@ -818,7 +818,7 @@ check_owner(const char *path, bool quiet)
            ok = false;
            if (!quiet) {
                fprintf(stderr, _("%s: bad permissions, should be mode 0%o\n"),
-                   path, sudoers_mode);
+                   path, (unsigned int)sudoers_mode);
            }
        }
     }