Commit 9b8f4519 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fix shell quoting problem which I indirectly introduced just before

the big power down when I changed sshtb to not invoke a subshell
wrapper, but to exec ssh directly. Built into tbacct was an extra pair
of \\ escapes to protect the outer double quotes from that extra
subshell.  When I removed that subshell, the extra escapes wreaked
havoc.

Needless to say, I really want to change how accounts are built on ops
to use tmcd like a regular experimental node. We can almost do that
now, except for the little detail that sending over 800 users would be
a lot of traffic for single updates. I've been meaning to extend the
protocol to allow for single updates, but have not had time yet!
parent d7a09272
......@@ -286,7 +286,7 @@ sub AddUser()
print "Adding user $user ($user_number) to $CONTROL.\n";
if (system("$SSH -host $CONTROL ".
"'$USERADD $user -u $user_number -c \\\"$fullname\\\" ".
"'$USERADD $user -u $user_number -c \"$fullname\" ".
"-k /usr/share/skel -h - -m -d $HOMEDIR/$user ".
"-g $default_groupname -s /bin/tcsh'")) {
if (($? >> 8) != $USEREXISTS) {
......@@ -468,7 +468,7 @@ sub UpdateUser(;$)
print "Updating user $user ($user_number) on $CONTROL\n";
if (system("$SSH -host $CONTROL ".
"'$USERMOD $user $remshellarg -c \\\"$fullname\\\"'")) {
"'$USERMOD $user $remshellarg -c \"$fullname\"'")) {
fatal("Could not modify user $user record on $CONTROL.");
}
}
......
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