]> granicus.if.org Git - sudo/commitdiff
Newer versions of Ubuntu have switched from using the "admin" group
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 6 May 2016 20:30:46 +0000 (14:30 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 6 May 2016 20:30:46 +0000 (14:30 -0600)
to the "sudo" group to align with Debian.  create_admin_success_flag()
now accepts either one.
https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1387347

plugins/sudoers/sudoers.c

index d95ba806768744913103af6679e1966810b4a153..2e3137682c80848a7815123b5ba6be12227d45f2 100644 (file)
@@ -1266,8 +1266,9 @@ create_admin_success_flag(void)
     int len, rval = -1;
     debug_decl(create_admin_success_flag, SUDOERS_DEBUG_PLUGIN)
 
-    /* Check whether the user is in the admin group. */
-    if (!user_in_group(sudo_user.pw, "admin"))
+    /* Check whether the user is in the sudo or admin group. */
+    if (!user_in_group(sudo_user.pw, "sudo") &&
+       !user_in_group(sudo_user.pw, "admin"))
        debug_return_int(true);
 
     /* Build path to flag file. */