mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Stash umask in struct sudo_user so we don't need to look it up later.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdio.h>
|
||||
#ifdef STDC_HEADERS
|
||||
@@ -318,6 +319,10 @@ sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group)
|
||||
user_ngids = ngids;
|
||||
}
|
||||
|
||||
/* Stash initial umask for later use. */
|
||||
user_umask = umask(SUDO_UMASK);
|
||||
umask(user_umask);
|
||||
|
||||
/* Setup debugging if indicated. */
|
||||
if (debug_flags != NULL) {
|
||||
sudo_debug_init(NULL, debug_flags);
|
||||
|
Reference in New Issue
Block a user