From bd4dc81a82f21f699404f0834e30bef530c57528 Mon Sep 17 00:00:00 2001 From: "Jamin W. Collins" Date: Sat, 17 Oct 2020 09:18:30 -0700 Subject: [PATCH 1/2] add parsing support for advertised force long opt Existing help output advertises --force as a long opt. -f, --force delete group even if it is the primary group of a user But errors when the long opt is used. groupdel: unrecognized option '--force' Signed-off-by: Jamin W. Collins --- src/groupdel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/groupdel.c b/src/groupdel.c index f941a84a..6a6c5339 100644 --- a/src/groupdel.c +++ b/src/groupdel.c @@ -323,6 +323,7 @@ static void process_flags (int argc, char **argv) int c; static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, + {"force", no_argument, NULL, 'f'}, {"root", required_argument, NULL, 'R'}, {"prefix", required_argument, NULL, 'P'}, {NULL, 0, NULL, '\0'} From a04287cf2450474d95b83b183ba2b2afdf505ee7 Mon Sep 17 00:00:00 2001 From: "Jamin W. Collins" Date: Sun, 1 Nov 2020 17:24:49 -0700 Subject: [PATCH 2/2] update groupdel man page for the --force option Signed-off-by: Jamin W. Collins --- man/groupdel.8.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/man/groupdel.8.xml b/man/groupdel.8.xml index 41116617..d06db096 100644 --- a/man/groupdel.8.xml +++ b/man/groupdel.8.xml @@ -91,6 +91,17 @@ are: + + + , + + + + This option forces the removal of the group, even if there's some user + having the group as the primary one. + + + ,