summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2004-03-18 20:58:13 +0000
committerivan <ivan>2004-03-18 20:58:13 +0000
commitd6f99aebb1f8a915b2bfddacbadb6cbbbed75ef0 (patch)
treec91e6a5bcec3939522e777e9203ecca631483505
parentc6d0edf2b1e83fd6abde09f100064f53c113bb4e (diff)
don't re-crypt encrypted passwords
-rw-r--r--FS/FS/part_export/shellcommands.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm
index db2e7aaf9..a4eb0a052 100644
--- a/FS/FS/part_export/shellcommands.pm
+++ b/FS/FS/part_export/shellcommands.pm
@@ -59,9 +59,15 @@ sub _export_command {
$finger = shell_quote $finger;
$quoted_password = shell_quote $_password;
$domain = $svc_acct->domain;
- $crypt_password = ''; #surpress "used only once" warnings
- $crypt_password = crypt( $svc_acct->_password,
+
+ #eventually should check a "password-encoding" field
+ if ( length($svc_acct->_password) == 13
+ || $svc_acct->_password =~ /^\$(1|2a?)\$/ ) {
+ $crypt_password = $svc_acct->_password;
+ } else {
+ $crypt_password = crypt( $svc_acct->_password,
$saltset[int(rand(64))].$saltset[int(rand(64))] );
+ }
$self->shellcommands_queue( $svc_acct->svcnum,
user => $self->option('user')||'root',