diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-12-02 07:49:09 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-12-02 07:49:09 +0000 |
commit | 83d312c018a06b03d442260f723b9654f3d219b4 (patch) | |
tree | 00a3235b74c8e7efac90fea639a97dbaf5319d46 /perl-install/authentication.pm | |
parent | 537fe7e25454c66f3195d5384975fc3b7cc1d37e (diff) | |
download | drakx-backup-do-not-use-83d312c018a06b03d442260f723b9654f3d219b4.tar drakx-backup-do-not-use-83d312c018a06b03d442260f723b9654f3d219b4.tar.gz drakx-backup-do-not-use-83d312c018a06b03d442260f723b9654f3d219b4.tar.bz2 drakx-backup-do-not-use-83d312c018a06b03d442260f723b9654f3d219b4.tar.xz drakx-backup-do-not-use-83d312c018a06b03d442260f723b9654f3d219b4.zip |
Move crypt() in the package it belongs to
Diffstat (limited to 'perl-install/authentication.pm')
-rw-r--r-- | perl-install/authentication.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/perl-install/authentication.pm b/perl-install/authentication.pm index f0bc7d517..8aefb3286 100644 --- a/perl-install/authentication.pm +++ b/perl-install/authentication.pm @@ -611,6 +611,11 @@ sub query_srv_names { map { $_->target } $query->answer; } +sub crypt { + my ($password, $md5) = @_; + crypt($password, $md5 ? '$1$' . salt(8) : salt(2)); +} + sub user_crypted_passwd { my ($u, $isMD5) = @_; $u->{password} ? &crypt($u->{password}, $isMD5) : $u->{pw} || ''; |