usermod --append mistakenly requires argument
Benno Schulenberg <[email protected]> Sat, 13 Jan 2007 15:17:01 +0100
| Newsgroups | gmane.linux.pld.shadow.general |
|---|---|
| Message-ID | <[email protected]> |
--Boundary_(ID_MZVwZRdBdvEar1WCoMdgyA)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
Hi,
In http://article.gmane.org/gmane.linux.gentoo.user/177537
Allan Gottlieb found that
usermod --append --groups ... ...
doesn't work, while
usermod -a -G ... ...
does. Attached patch fixes this.
Benno
--Boundary_(ID_MZVwZRdBdvEar1WCoMdgyA)
Content-type: text/x-diff; charset=us-ascii;
name=shadow--usermod-noargument.patch
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=shadow--usermod-noargument.patch
diff -ur cvs-shadow/src/usermod.c shadow/src/usermod.c
--- cvs-shadow/src/usermod.c 2006-11-14 16:40:54.000000000 +0100
+++ shadow/src/usermod.c 2007-01-13 14:59:02.000000000 +0100
@@ -905,7 +905,7 @@
*/
int c;
static struct option long_options[] = {
- {"append", required_argument, NULL, 'a'},
+ {"append", no_argument, NULL, 'a'},
{"comment", required_argument, NULL, 'c'},
{"home", required_argument, NULL, 'd'},
{"expiredate", required_argument, NULL, 'e'},
--Boundary_(ID_MZVwZRdBdvEar1WCoMdgyA)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline