From 7e17182e4c29c0e51f3c6c8fd1cbb705d4748688 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Thu, 4 Sep 2008 20:20:20 +0000 Subject: [PATCH] * NEWS, src/groupmems.c, man/groupmems.8.xml: Document the long options. --- ChangeLog | 5 +++++ NEWS | 2 ++ man/groupmems.8.xml | 10 +++++----- src/groupmems.c | 13 ++++++++++++- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae128bce..164b3923 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-04 Nicolas François + + * NEWS, src/groupmems.c, man/groupmems.8.xml: Document the long + options. + 2008-09-03 Nicolas François * lib/prototypes.h, libmisc/audit_help.c: Define new type diff --git a/NEWS b/NEWS index 02f90d1e..4bc228e0 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,8 @@ shadow-4.1.2.1 -> shadow-4.1.3 UNRELEASED * Use the groupmems PAM service name instead of groupmod. * Fix segmentation faults when adding or removing users from a group. * Added support for shadow groups. + * Added support long options --add (-a), --delete (-d), --purge (-p), + --list (-l), --group (-g). - newusers * Implement the -r, --system option. - passwd diff --git a/man/groupmems.8.xml b/man/groupmems.8.xml index 935dc657..0ae27440 100644 --- a/man/groupmems.8.xml +++ b/man/groupmems.8.xml @@ -50,7 +50,7 @@ - user_name + , user_name Add a new user to the group membership list. @@ -61,7 +61,7 @@ - user_name + , user_name Delete a user from the group membership list. @@ -77,7 +77,7 @@ - group_name + , group_name The superuser can specify which group membership list to modify. @@ -85,13 +85,13 @@ - + , List the group membership list. - + , Purge all users from the group membership list. diff --git a/src/groupmems.c b/src/groupmems.c index 3b92348a..f8557839 100644 --- a/src/groupmems.c +++ b/src/groupmems.c @@ -362,7 +362,18 @@ static void display_members (const char *const *members) static void usage (void) { - (void) fputs (_("Usage: groupmems -a username | -d username | -p | -l [-g groupname]\n"), stderr); + (void) fputs (_("Usage: groupmems [options] [action]\n" + "\n" + "Options:\n" + " -g, --group groupname change groupname instead of the user's group\n" + " (root only)\n" + "\n" + "Actions:\n" + " -a, --add username add username to the members of the group\n" + " -d, --delete username remove username from the members of the group\n" + " -p, --purge purge all members from the group\n" + " -l, --list list the members of the group\n" + "\n"), stderr); fail_exit (EXIT_USAGE); }