From 83d312c018a06b03d442260f723b9654f3d219b4 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 2 Dec 2004 07:49:09 +0000 Subject: Move crypt() in the package it belongs to --- perl-install/any.pm | 4 ---- perl-install/authentication.pm | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/perl-install/any.pm b/perl-install/any.pm index 0099ecf92..7d362b166 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -100,10 +100,6 @@ sub add_users { } } -sub crypt { - my ($password, $md5) = @_; - crypt($password, $md5 ? '$1$' . salt(8) : salt(2)); -} sub enableShadow() { run_program::rooted($::prefix, "pwconv") or log::l("pwconv failed"); run_program::rooted($::prefix, "grpconv") or log::l("grpconv failed"); 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} || ''; -- cgit v1.2.1