mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Also check sudoers gid if sudoers is group writable.
This commit is contained in:
@@ -964,7 +964,7 @@ open_sudoers(const char *sudoers, int doedit, int *keepopen)
|
||||
else if (statbuf.st_uid != sudoers_uid)
|
||||
log_error(NO_EXIT, _("%s is owned by uid %u, should be %u"), sudoers,
|
||||
(unsigned int) statbuf.st_uid, (unsigned int) sudoers_uid);
|
||||
else if (ISSET(statbuf.st_mode, S_IRGRP) && statbuf.st_gid != sudoers_gid)
|
||||
else if (statbuf.st_gid != sudoers_gid && ISSET(statbuf.st_mode, S_IRGRP|S_IWGRP))
|
||||
log_error(NO_EXIT, _("%s is owned by gid %u, should be %u"), sudoers,
|
||||
(unsigned int) statbuf.st_gid, (unsigned int) sudoers_gid);
|
||||
else if ((fp = fopen(sudoers, "r")) == NULL)
|
||||
|
Reference in New Issue
Block a user