[yast-commit] r61041 - /trunk/users/src/Users.pm
Author: jsuchome Date: Fri Feb 26 14:05:38 2010 New Revision: 61041 URL: http://svn.opensuse.org/viewcvs/yast?rev=61041&view=rev Log: removed unused functions Modified: trunk/users/src/Users.pm Modified: trunk/users/src/Users.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/users/src/Users.pm?rev=61041&r1=61040&r2=61041&view=diff ============================================================================== --- trunk/users/src/Users.pm (original) +++ trunk/users/src/Users.pm Fri Feb 26 14:05:38 2010 @@ -5014,88 +5014,6 @@ return ""; } -##------------------------------------ -# Check the password of current user for the valid characters -# This function is OBSOLETE, use UsersSimple->CheckPassword instead -# return value is error message -BEGIN { $TYPEINFO{CheckPassword} = ["function", "string", "string"]; } -sub CheckPassword { - - my $self = shift; - my $pw = shift; - my $type = UsersCache->GetUserType (); - y2warning ("This function is OBSOLETE, use UsersSimple->CheckPassword"); - return UsersSimple->CheckPassword ($pw, $type); -} - - -##------------------------------------ -# Check the password of given user or group: part 2, checking for -# problems that may be skipped (accepted) by user -# This function is OBSOLETE, it is here just for compatibility reasons, new -# function UsersSimple->CheckPasswordUI has different API) -# @return value is map with the problem found -BEGIN { $TYPEINFO{CheckPasswordUI} = ["function", - ["map", "string", "string"], - "string", "string", ["map", "string", "any"]]; -} -sub CheckPasswordUI { - - my $self = shift; - my $name = $_[0]; - my $pw = $_[1]; - my %ui_map = %{$_[2]}; - my $type = UsersCache->GetUserType (); - my $min_length = $self->GetMinPasswordLength (); - my %ret = (); - - y2warning ("this function is obsolete, use UsersSimple->CheckPasswordUI"); - if ($pw eq "") { - return \%ret; - } - - if (UsersSimple->CrackLibUsed () && (($ui_map{"crack"} || "") ne $pw)) { - my $error = UsersSimple->CrackPassword ($pw); - if ($error ne "") { - $ret{"question_id"} = "crack"; - # popup question - $ret{"question"} = sprintf (__("The password is too simple: -%s -Really use this password?"), $error); - return \%ret; - } - } - - if (UsersSimple->ObscureChecksUsed () && - (($ui_map{"obscure"} || "") ne $pw)) - { - my $error = UsersSimple->CheckObscurity ($name, $pw, UsersCache->GetCurrentSummary ()); - if ($error ne "") { - $ret{"question_id"} = "obscure"; - $ret{"question"} = $error; - return \%ret; - } - } - - if (($ui_map{"short"} || "") ne $pw) { - if (length ($pw) < $min_length) { - $ret{"question_id"} = "short"; - # popup questionm, %i is number - $ret{"question"} = sprintf (__("The password should have at least %i characters. -Really use this shorter password?"), $min_length); - } - } - - if (($ui_map{"truncate"} || "") ne $pw) { - my $error = UsersSimple->CheckPasswordMaxLength ($pw, $type); - if ($error ne "") { - $ret{"question_id"} = "truncate"; - $ret{"question"} = $error; - } - } - return \%ret; -} - ##------------------------------------ # Check if it is possible to write (=create homes) to given directory -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn.opensuse.org