diff -Nru shadow-4.5/debian/changelog shadow-4.5/debian/changelog --- shadow-4.5/debian/changelog 2019-03-22 19:05:38.000000000 +0000 +++ shadow-4.5/debian/changelog 2019-08-21 10:25:16.000000000 +0000 @@ -1,3 +1,10 @@ +shadow (1:4.5-1ubuntu2.1) bionic; urgency=medium + + * debian/patches/1014_extrausers_delgroup.patch + - add --extrausers option to "groupdel" (LP: #1840375) + + -- Michael Vogt Wed, 21 Aug 2019 12:25:16 +0200 + shadow (1:4.5-1ubuntu2) bionic; urgency=medium * debian/patches/1013_extrausers_deluser.patch diff -Nru shadow-4.5/debian/patches/1014_extrausers_delgroup.patch shadow-4.5/debian/patches/1014_extrausers_delgroup.patch --- shadow-4.5/debian/patches/1014_extrausers_delgroup.patch 1970-01-01 00:00:00.000000000 +0000 +++ shadow-4.5/debian/patches/1014_extrausers_delgroup.patch 2019-08-21 10:24:23.000000000 +0000 @@ -0,0 +1,62 @@ +Index: shadow-4.5/src/groupdel.c +=================================================================== +--- shadow-4.5.orig/src/groupdel.c ++++ shadow-4.5/src/groupdel.c +@@ -84,6 +84,12 @@ static void open_files (void); + static void group_busy (gid_t gid); + static void process_flags (int argc, char **argv); + ++#ifndef EXTRAUSERS_OPT ++#define EXTRAUSERS_OPT 100000 ++#endif ++ ++static bool use_extrausers = false; ++ + /* + * usage - display usage message and exit + */ +@@ -98,6 +104,7 @@ static /*@noreturn@*/void usage (int sta + (void) fputs (_(" -h, --help display this help message and exit\n"), usageout); + (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); + (void) fputs (_(" -f, --force delete group even if it is the primary group of a user\n"), usageout); ++ (void) fputs (_(" --extrausers Use the extra users database\n"), usageout); + (void) fputs ("\n", usageout); + exit (status); + } +@@ -320,6 +327,7 @@ static void process_flags (int argc, cha + static struct option long_options[] = { + {"help", no_argument, NULL, 'h'}, + {"root", required_argument, NULL, 'R'}, ++ {"extrausers", no_argument, NULL, EXTRAUSERS_OPT}, + {NULL, 0, NULL, '\0'} + }; + +@@ -334,6 +342,9 @@ static void process_flags (int argc, cha + case 'f': + check_group_busy = false; + break; ++ case EXTRAUSERS_OPT: ++ use_extrausers = true; ++ break; + default: + usage (E_USAGE); + } +@@ -474,6 +485,18 @@ int main (int argc, char **argv) + group_busy (group_id); + } + ++ if (use_extrausers) { ++ pw_setdbname (EXTRAUSERS_PASSWD_FILE); ++ spw_setdbname (EXTRAUSERS_SHADOW_FILE); ++ gr_setdbname (EXTRAUSERS_GROUP_FILE); ++ /* TODO expose this information in other tools */ ++ sub_uid_setdbname(EXTRAUSERS_SUBUID_FILE); ++ sub_gid_setdbname(EXTRAUSERS_SUBGID_FILE); ++#ifdef SHADOWGRP ++ sgr_setdbname (EXTRAUSERS_SHADOWGROUP_FILE); ++#endif ++ } ++ + /* + * Do the hard stuff - open the files, delete the group entries, + * then close and update the files. diff -Nru shadow-4.5/debian/patches/series shadow-4.5/debian/patches/series --- shadow-4.5/debian/patches/series 2019-03-22 19:05:38.000000000 +0000 +++ shadow-4.5/debian/patches/series 2019-08-21 10:25:04.000000000 +0000 @@ -18,4 +18,5 @@ 1011_extrausers_toggle.patch 1012_extrausers_chfn.patch 1013_extrausers_deluser.patch +1014_extrausers_delgroup.patch 2000_fix-su-pam-env-handling