projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cccf2f3
)
don't re-crypt encrypted passwords
author
ivan
<ivan>
Thu, 18 Mar 2004 20:58:11 +0000
(20:58 +0000)
committer
ivan
<ivan>
Thu, 18 Mar 2004 20:58:11 +0000
(20:58 +0000)
FS/FS/part_export/shellcommands.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/shellcommands.pm
b/FS/FS/part_export/shellcommands.pm
index
db2e7aa
..
a4eb0a0
100644
(file)
--- 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;
$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))] );
$saltset[int(rand(64))].$saltset[int(rand(64))] );
+ }
$self->shellcommands_queue( $svc_acct->svcnum,
user => $self->option('user')||'root',
$self->shellcommands_queue( $svc_acct->svcnum,
user => $self->option('user')||'root',