2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Use sys/stat.h defines instead of bare octal values.

This commit is contained in:
Todd C. Miller
2016-11-07 13:36:05 -07:00
parent 2b020c9f17
commit 8133cdfdf6
12 changed files with 43 additions and 23 deletions

View File

@@ -225,7 +225,7 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
{
char **edit_argv = NULL;
char *iolog_path = NULL;
mode_t cmnd_umask = 0777;
mode_t cmnd_umask = ACCESSPERMS;
struct sudo_nss *nss;
bool nopass = false;
int cmnd_status = -1, oldlocale, validated;
@@ -538,7 +538,7 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
* If user's umask is more restrictive, OR in those bits too
* unless umask_override is set.
*/
if (def_umask != 0777) {
if (def_umask != ACCESSPERMS) {
cmnd_umask = def_umask;
if (!def_umask_override)
cmnd_umask |= user_umask;