From ea514dc391666b45a7adf4d749e0ab2c97821bb0 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 2 Mar 2015 13:58:45 -0700 Subject: [PATCH] Fix compiler warning on systems where mode_t is not unsigned int, such as 32-bit Solaris. --- plugins/sudoers/visudo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } } }