summaryrefslogtreecommitdiffstats
path: root/source/a/shadow/adduser
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/shadow/adduser')
-rw-r--r--source/a/shadow/adduser13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/a/shadow/adduser b/source/a/shadow/adduser
index 02385e33c..038a0a949 100644
--- a/source/a/shadow/adduser
+++ b/source/a/shadow/adduser
@@ -1,8 +1,8 @@
#!/bin/bash
#
# Copyright 1995 Hrvoje Dogan, Croatia.
-# Copyright 2002, 2003, 2004, 2008, 2009 Stuart Winter, Surrey, England, UK.
-# Copyright 2004, 2008, 2009 Slackware Linux, Inc., Concord, CA, USA
+# Copyright 2002-2004, 2008, 2009, 2010 Stuart Winter, Surrey, England, UK.
+# Copyright 2004, 2008-2010 Slackware Linux, Inc., Concord, CA, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -29,12 +29,15 @@
# Author : Stuart Winter <mozes@slackware.com>
# Based on the original Slackware adduser by Hrvoje Dogan
# with modifications by Patrick Volkerding
-# Version: 1.12
+# Version: 1.13
##########################################################################
# Usage..: adduser [<new_user_name>]
##########################################################################
# History #
###########
+# v1.13 - 13/01/10
+# * Fix bug that removed underscore characters from group names.
+# Thanks to mRgOBLIN for the report and Jim Hawkins for the fix. <sw>
# v1.12 - 21/07/09
# * Adjusted the search of /etc/passwd to exclude the NIS inclusion
# string. Thanks to Dominik L. Borkowski.
@@ -282,8 +285,8 @@ while [ ! -z "$needinput" ]; do
history -c
history -s "$AGID"
echo "Press ENTER to continue without adding any additional groups"
- echo "Or press the UP arrow to add/select/edit additional groups"
- AGID="$(get_input ": " | tr -d '[:punct:]' | tr -s ' ' | sed 's?^ $??g' )"
+ echo "Or press the UP arrow key to add/select/edit additional groups"
+ AGID="$(get_input ": " | sed 's/[^A-Za-z0-9 _]//g;s/ */ /g;s/^ $//g' )"
if [ ! -z "$AGID" ]; then
check_group "$AGID" # check all groups at once (treated as N # of params)
if [ $? -gt 0 ]; then