X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fshellcommands.pm;h=78f9e96909573925ac8dc22ca2dd3c99dfad24ac;hb=243b248a929e99a9cc64e16f29e4a49afeb87a3c;hp=cee54b48880a7b57f64cb5bf476c2c74c97aa9cf;hpb=dabdf357484badff95afcae50b08ec1c3bb58343;p=freeside.git diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm index cee54b488..78f9e9690 100644 --- a/FS/FS/part_export/shellcommands.pm +++ b/FS/FS/part_export/shellcommands.pm @@ -83,7 +83,7 @@ running will not accept a domain as a parameter. You will need to this.form.unsuspend_stdin.value=""; '>
$uid
$gid
$finger
- GECOS, already quoted for the shell (do not add additional quotes)
+ $first
- First name of GECOS, already quoted for the shell (do not add additional quotes)
+ $last
- Last name of GECOS, already quoted for the shell (do not add additional quotes)
$dir
- home directory
$shell
$quota
@@ -206,6 +209,10 @@ sub _export_command {
$email = '';
}
+ $finger =~ /^(.*)\s+(\S+)$/ or $finger =~ /^((.*))$/;
+ ($first, $last ) = ( $1, $2 );
+ $first = shell_quote $first;
+ $last = shell_quote $last;
$finger = shell_quote $finger;
$quoted_password = shell_quote $_password;
$domain = $svc_acct->domain;
@@ -239,6 +246,10 @@ sub _export_replace {
${"old_$_"} = $old->getfield($_) foreach $old->fields;
${"new_$_"} = $new->getfield($_) foreach $new->fields;
}
+ $new_finger =~ /^(.*)\s+(\S+)$/ or $finger =~ /^((.*))$/;
+ ($new_first, $new_last ) = ( $1, $2 );
+ $new_first = shell_quote $new_first;
+ $new_last = shell_quote $new_last;
$new_finger = shell_quote $new_finger;
$quoted_new__password = shell_quote $new__password; #old, wrong?
$new_quoted_password = shell_quote $new__password; #new, better?