Add explicit cast from mode_t -> u_int in printf to silence warnings on Solaris

This commit is contained in:
Todd C. Miller
2005-04-24 23:24:58 +00:00
parent 7ce5994d6c
commit c7ea24f2cc
2 changed files with 8 additions and 7 deletions

3
sudo.c
View File

@@ -964,7 +964,8 @@ open_sudoers(sudoers, keepopen)
log_error(0, "%s is zero length", sudoers);
else if ((statbuf.st_mode & 07777) != SUDOERS_MODE)
log_error(0, "%s is mode 0%o, should be 0%o", sudoers,
(statbuf.st_mode & 07777), SUDOERS_MODE);
(unsigned int) (statbuf.st_mode & 07777),
(unsigned int) SUDOERS_MODE);
else if (statbuf.st_uid != SUDOERS_UID)
log_error(0, "%s is owned by uid %lu, should be %lu", sudoers,
(unsigned long) statbuf.st_uid, (unsigned long) SUDOERS_UID);