From: Todd C. Miller Date: Mon, 2 Mar 2015 20:58:45 +0000 (-0700) Subject: Fix compiler warning on systems where mode_t is not unsigned int, X-Git-Tag: SUDO_1_8_13^2~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea514dc391666b45a7adf4d749e0ab2c97821bb0;p=sudo Fix compiler warning on systems where mode_t is not unsigned int, such as 32-bit Solaris. --- diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index 1c54897c4..4a27a3731 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -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); } } }