]> granicus.if.org Git - sudo/commitdiff
Fix restoration of effective uid/gid in command_details.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 25 Aug 2014 17:30:03 +0000 (11:30 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 25 Aug 2014 17:30:03 +0000 (11:30 -0600)
This masked the effects an unset (really zero) egid.
Bug 656

src/sudo_edit.c

index c1e85ece4bbed276c0d021f49235f6e405ac4039..e1f709631f563bca431c20ee62e558457d4c0244 100644 (file)
@@ -614,9 +614,9 @@ sudo_edit(struct command_details *command_details)
 
     /* Restore saved command_details. */
     command_details->uid = saved_command_details.uid;
-    command_details->euid = saved_command_details.uid;
+    command_details->euid = saved_command_details.euid;
     command_details->gid = saved_command_details.gid;
-    command_details->egid = saved_command_details.gid;
+    command_details->egid = saved_command_details.egid;
     command_details->ngroups = saved_command_details.ngroups;
     command_details->groups = saved_command_details.groups;
     command_details->argv = saved_command_details.argv;