From 5ee1e5bbcbd047a9bd0f9fd18434393e149498c0 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 6 May 2016 14:30:46 -0600 Subject: [PATCH] Newer versions of Ubuntu have switched from using the "admin" group 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index d95ba8067..2e3137682 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -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. */ -- 2.40.0