aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AdminPanel/Users/GUsers.pm6
-rwxr-xr-xmodules/usermanager/usermanager2
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;