]> granicus.if.org Git - sudo/commitdiff
Set runas egid to the same value as runas gid if egid not specified
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 25 Aug 2014 17:27:30 +0000 (11:27 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 25 Aug 2014 17:27:30 +0000 (11:27 -0600)
by the plugin.  Only affects new files created by sudoedit.  Bug #656

src/sudo.c

index 3538c674bec647333789c6796f3139bb39542771..aa66e5ba722d943935b86021ec6e21594c6384d9 100644 (file)
@@ -710,6 +710,8 @@ command_info_to_details(char * const info[], struct command_details *details)
 
     if (!ISSET(details->flags, CD_SET_EUID))
        details->euid = details->uid;
+    if (!ISSET(details->flags, CD_SET_EGID))
+       details->egid = details->gid;
 
 #ifdef HAVE_SETAUTHDB
     aix_setauthdb(IDtouser(details->euid));