summaryrefslogtreecommitdiff
path: root/Users/Users.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Users/Users.pm')
-rw-r--r--Users/Users.pm22
1 files changed, 9 insertions, 13 deletions
diff --git a/Users/Users.pm b/Users/Users.pm
index b47f8fb..03d77a2 100644
--- a/Users/Users.pm
+++ b/Users/Users.pm
@@ -73,14 +73,14 @@ $cmd_chfn = &Utils::File::locate_tool ("chfn");
$cmd_pw = &Utils::File::locate_tool ("pw");
# enum like for verbose group array positions
-my $ID = 0;
-my $LOGIN = 1;
-my $PASSWD = 2;
-my $UID = 3;
-my $GID = 4;
-my $COMMENT = 5;
-my $HOME = 6;
-my $SHELL = 7;
+my $i = 0;
+my $LOGIN = $i++;
+my $PASSWD = $i++;
+my $UID = $i++;
+my $GID = $i++;
+my $COMMENT = $i++;
+my $HOME = $i++;
+my $SHELL = $i++;
%login_defs_prop_map = ();
%profiles_prop_map = ();
@@ -376,10 +376,9 @@ sub get_logindefs
sub get
{
my ($ifh, @users, %users_hash);
- my (@line, @users, $counter);
+ my (@line, @users);
# Find the passwd file.
- $counter = 1;
$ifh = &Utils::File::open_read_from_names(@passwd_names);
return unless ($ifh);
@@ -390,9 +389,6 @@ sub get
next if &Utils::Util::ignore_line ($_);
@line = split ':', $_, -1;
- unshift @line, $counter;
- $counter++;
-
$login = $line[$LOGIN];
@comment = split ',', $line[$COMMENT], 5;