Commit 4204bdf8 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Make sure paswd is quoted when passing to a shell command since

passwords now have $ signs in them!
parent 9bb8d335
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -222,7 +222,7 @@ sub os_useradd($$$$$$$$)
$glist = "-G $glist";
}
if (system("$USERADD -M -u $uid -g $gid $glist -p $pswd ".
if (system("$USERADD -M -u $uid -g $gid $glist -p '$pswd' ".
"-d $homedir -s /bin/tcsh -c \"$gcos\" $login") != 0) {
warn "*** WARNING: $USERADD $login error.\n";
return -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment