Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > media > main-updates-src > by-pkgid > 9cd8634de8e36116a404116cd5910eb2 > files > 3

drakxtools-13.51-10.2.src.rpm

--- drakxtools-13.51.old/perl-install/any.pm	2011-08-17 19:36:03.000000000 +0400
+++ drakxtools-13.51/perl-install/any.pm	2011-08-18 18:42:13.000000000 +0400
@@ -874,7 +874,10 @@
 	$id >= 500 or $in->ask_yesorno('', N("%s should be above 500. Accept anyway?", $name)) or return;
 	'ok';
     };
-    my $ret = $in->ask_from_(
+    
+    my $rootret = 0;
+    if ($superuser) {
+    $rootret = $in->ask_from_(
         { title => N("User management"),
           interactive_help_id => 'addUser',
 	  if_($::isInstall && $superuser, cancel => ''),
@@ -887,6 +890,21 @@
 	    validate => sub { authentication::check_given_password($in, $superuser, 2 * $security) } },
 	  { label => N("Password (again)"), val => \$superuser->{password2}, hidden => 1, alignment => 'right' },
               ) : (),
+	  ],
+      );
+      } else {
+        $rootret = 1;
+      }
+      
+    my $userret = 0;
+    
+    if ($rootret){
+    
+    $userret = $in->ask_from_(
+        { title => N("User management"),
+          interactive_help_id => 'addUser',
+	  if_($::isInstall && $superuser, cancel => ''),
+        }, [ 
 	  { label => N("Enter a user"), title => 1 }, if_($names, { label => $names }),
            if_($security <= 3 && !$options{noicons} && @icons,
 	  { label => N("Icon"), val => \ ($u->{icon} ||= 'default'), list => \@icons, icon2f => \&face2png,
@@ -914,6 +932,7 @@
                ),
 	  ],
     );
+    }
 
     if ($xguest && !is_xguest_installed()) {
         $in->do_pkgs->ensure_is_installed('xguest', '/etc/security/namespace.d/xguest.conf');
@@ -925,7 +944,7 @@
 
     push @$users, $u if $u->{name};
 
-    $ret && $u;
+    $rootret && $userret && $u;
 }
 
 sub sessions() {