X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fshellcommands.pm;h=78f9e96909573925ac8dc22ca2dd3c99dfad24ac;hb=35effa1bf4ac902547615c816960bbc8db8e7256;hp=0fc0cc9c6e782b284e58c22756910c87634d71f9;hpb=cb3d16defa2515e178290fad49caaebcd8a05bf6;p=freeside.git diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm index 0fc0cc9c6..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?