File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,7 @@ exec_mailer(int pipein) // -V1082
281281 const struct eventlog_config * evl_conf = eventlog_getconf ();
282282 char * last , * mflags , * p , * argv [MAX_MAILFLAGS + 1 ];
283283 const char * mpath = evl_conf -> mailerpath ;
284+ gid_t mailgid = evl_conf -> mailgid ;
284285 size_t i ;
285286 const char * const root_envp [] = {
286287 "HOME=/" ,
@@ -326,14 +327,14 @@ exec_mailer(int pipein) // -V1082
326327 ROOT_UID );
327328 goto bad ;
328329 }
329- if (setgid (evl_conf -> mailgid ) != 0 ) {
330+ if (setgid (mailgid ) != 0 ) {
330331 sudo_debug_printf (SUDO_DEBUG_ERROR , "unable to change gid to %u" ,
331- (unsigned int )evl_conf -> mailgid );
332+ (unsigned int )mailgid );
332333 goto bad ;
333334 }
334- if (setgroups (1 , & evl_conf -> mailgid ) != 0 ) {
335+ if (setgroups (1 , & mailgid ) != 0 ) {
335336 sudo_debug_printf (SUDO_DEBUG_ERROR , "unable to set groups to %u" ,
336- (unsigned int )evl_conf -> mailgid );
337+ (unsigned int )mailgid );
337338 goto bad ;
338339 }
339340 if (evl_conf -> mailuid != ROOT_UID ) {
You can’t perform that action at this time.
0 commit comments