diff options
author | Angelo Naselli <anaselli@linux.it> | 2013-12-09 17:48:53 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2013-12-09 17:48:53 +0100 |
commit | 3cb9fc2980fe586b599b5704e2db95bf50b56b87 (patch) | |
tree | 4588936a4f2ca18cdf5eac97f0b34ef1a777642d | |
parent | bc4d221c5e79a741adc91b58d3bf706d92ccb6dc (diff) | |
download | manatools-3cb9fc2980fe586b599b5704e2db95bf50b56b87.tar manatools-3cb9fc2980fe586b599b5704e2db95bf50b56b87.tar.gz manatools-3cb9fc2980fe586b599b5704e2db95bf50b56b87.tar.bz2 manatools-3cb9fc2980fe586b599b5704e2db95bf50b56b87.tar.xz manatools-3cb9fc2980fe586b599b5704e2db95bf50b56b87.zip |
used security::level
-rw-r--r-- | AdminPanel/Users/GUsers.pm | 6 | ||||
-rwxr-xr-x | modules/usermanager/usermanager | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/AdminPanel/Users/GUsers.pm b/AdminPanel/Users/GUsers.pm index 051dd571..388b9227 100644 --- a/AdminPanel/Users/GUsers.pm +++ b/AdminPanel/Users/GUsers.pm @@ -30,6 +30,7 @@ package AdminPanel::Users::GUsers; use strict; use common; +use security::level; use run_program; ## USER is from userdrake use USER; @@ -47,7 +48,6 @@ our @EXPORT = qw(addUserDialog sub addUserDialog { - my $secfile = '/etc/sysconfig/msec'; my $GetValue = -65533; ## Used by USER (for getting values? TODO need explanations, where?) my $dontcreatehomedir = 0; my $is_system = 0; my $ctx = USER::ADMIN->new; @@ -199,8 +199,8 @@ sub addUserDialog { $errorString = N("Password Mismatch"); $continue = 0; } - my %sec = getVarsFromSh($secfile); - if ($sec{SECURE_LEVEL} && $sec{SECURE_LEVEL} > 3 && length($passwd) < 6) { + my $sec = security::level::get(); + if ($sec > 3 && length($passwd) < 6) { $errorString = N("This password is too simple. \n Good passwords should be > 6 characters"); $continue = 0; } diff --git a/modules/usermanager/usermanager b/modules/usermanager/usermanager index c7b00c1a..9bb2fc63 100755 --- a/modules/usermanager/usermanager +++ b/modules/usermanager/usermanager @@ -5,6 +5,7 @@ use lib qw(/usr/lib/libDrakX); use standalone; #- warning, standalone must be loaded very first, for 'explanations' use common; +use security::level; use AdminPanel::Shared; use AdminPanel::Users::GUsers; @@ -16,6 +17,7 @@ my $wm_icon = "/usr/share/icons/userdrake.png"; yui::YUI::app()->setApplicationTitle(N("Mageia Users Management Tool")); yui::YUI::app()->setApplicationIcon($wm_icon); +print "-----------> " . security::level::get() ."\n"; # TODO AdminPanel::Users::GUsers::addUserDialog(); 1; |