Set aux group vector for PERM_RUNAS and restore group vector for
PERM_ROOT if we previously changed it. Stash the runas group vector so we don't have to call initgroups more than once. Also add no-op check to check_perms.
This commit is contained in:
@@ -353,9 +353,8 @@ log_error(flags, fmt, va_alist)
|
||||
va_start(ap);
|
||||
#endif
|
||||
|
||||
/* Become root if we are not already to avoid user control */
|
||||
if (geteuid() != 0)
|
||||
set_perms(PERM_ROOT);
|
||||
/* Become root if we are not already to avoid user interference */
|
||||
set_perms(PERM_ROOT);
|
||||
|
||||
/* Expand printf-style format + args. */
|
||||
evasprintf(&message, fmt, ap);
|
||||
|
Reference in New Issue
Block a user