Skip to content

Commit

Permalink
Merge pull request #12 from jsuchome/master
Browse files Browse the repository at this point in the history
set the value of CHARACTER_CLASS, read from /etc/login.defs
  • Loading branch information
jsuchome committed Mar 28, 2013
2 parents cc72e53 + 6cd8515 commit 50c75ed
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.23.4
2.23.5
7 changes: 7 additions & 0 deletions package/yast2-users.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Mar 28 14:38:56 CET 2013 - jsuchome@suse.cz

- set the value of CHARACTER_CLASS, read from /etc/login.defs
(bnc#810482)
- 2.23.5

-------------------------------------------------------------------
Tue Feb 26 13:07:33 CET 2013 - jsuchome@suse.cz

Expand Down
1 change: 1 addition & 0 deletions src/Users.pm
Expand Up @@ -1345,6 +1345,7 @@ sub ReadSystemDefaults {
my $login_defs = SCR->Dir (".etc.login_defs");
if (contains ($login_defs, "CHARACTER_CLASS")) {
$character_class= SCR->Read (".etc.login_defs.CHARACTER_CLASS");
UsersSimple->SetCharacterClass ($character_class);
}

my %max_lengths = %{Security->PasswordMaxLengths ()};
Expand Down
8 changes: 8 additions & 0 deletions src/UsersSimple.pm
Expand Up @@ -240,6 +240,14 @@ sub bool {
return $param;
}

##------------------------------------
# set new value for $character_class
BEGIN { $TYPEINFO{SetCharacterClass} = ["function", "void", "string"];}
sub SetCharacterClass {
my $self = shift;
$character_class = shift;
}

##------------------------------------
# set new cracklib dictionary path
BEGIN { $TYPEINFO{SetCrackLibDictPath} = ["function", "void", "string"];}
Expand Down

0 comments on commit 50c75ed

Please sign in to comment.