From dba4eeaf3610792b0ed1149723a8383cc4a6fef1 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 26 Jul 2002 02:33:27 +0000 Subject: [PATCH] shellcommands edit gecos field too --- FS/FS/part_export.pm | 2 +- FS/FS/part_export/shellcommands.pm | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index 0597cddf2..64d21d723 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -719,7 +719,7 @@ tie my %sqlmail_options, 'Tie::IxHash', 'desc' => 'Real-time export via remote SSH (i.e. useradd, userdel, etc.)', 'options' => \%shellcommands_options, 'nodomain' => 'Y', - 'notes' => 'Run remote commands via SSH. Usernames are considered unique (also see shellcommands_withdomain). You probably want this if the commands you are running will not accept a domain as a parameter. You will need to setup SSH for unattended operation.

Use these buttons for some useful presets:', + 'notes' => 'Run remote commands via SSH. Usernames are considered unique (also see shellcommands_withdomain). You probably want this if the commands you are running will not accept a domain as a parameter. You will need to setup SSH for unattended operation.

Use these buttons for some useful presets:', }, 'shellcommands_withdomain' => { diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm index 56cd569af..e4005761b 100644 --- a/FS/FS/part_export/shellcommands.pm +++ b/FS/FS/part_export/shellcommands.pm @@ -1,6 +1,7 @@ package FS::part_export::shellcommands; use vars qw(@ISA @saltset); +use String::ShellQuote; use FS::part_export; @ISA = qw(FS::part_export); @@ -27,6 +28,7 @@ sub _export_command { no strict 'refs'; ${$_} = $svc_acct->getfield($_) foreach $svc_acct->fields; } + $finger = shell_quote $finger; $crypt_password = ''; #surpress "used only once" warnings $crypt_password = crypt( $svc_acct->_password, $saltset[int(rand(64))].$saltset[int(rand(64))] ); @@ -47,6 +49,7 @@ sub _export_replace { ${"old_$_"} = $old->getfield($_) foreach $old->fields; ${"new_$_"} = $new->getfield($_) foreach $new->fields; } + $new_finger = shell_quote $new_finger; $new_crypt_password = ''; #surpress "used only once" warnings $new_crypt_password = crypt( $new->_password, $saltset[int(rand(64))].$saltset[int(rand(64))]); -- 2.11.0