--- loncom/Attic/lcuseradd 2004/08/06 10:29:37 1.28 +++ loncom/Attic/lcuseradd 2004/09/02 18:59:24 1.29 @@ -6,7 +6,7 @@ # with adding a user with filesystem privileges (e.g. author) # # -# $Id: lcuseradd,v 1.28 2004/08/06 10:29:37 foxr Exp $ +# $Id: lcuseradd,v 1.29 2004/09/02 18:59:24 albertel Exp $ ### ############################################################################### @@ -247,8 +247,9 @@ if ($status) { print "Done adding user\n" unless $noprint; # Make www a member of that user group. my $groups=`/usr/bin/groups www` or &Exit(6); +print "groups $groups\n"; # untaint -my ($safegroups)=($groups=~/([\s\w]+)/); +my ($safegroups)=($groups=~/:\s*([\s\w]+)/); $groups=$safegroups; chomp $groups; $groups=~s/^\S+\s+\:\s+//; my @grouplist=split(/\s+/,$groups);