<00149>
lastLogin Never logged in
approvedBy SLS
lastLogin Never logged in
00149>
####
## assume that I'm using strict, using warnings, and that all data structures tus far, are populated correctly. I'm truncating the code for the sake of brevity
foreach my $inner (keys %{$users{$lastuid}})
{
my $last = $users{$lastuid}{$inner};
genCtl($inner, $last, $lastuid);
}
print FH "\t\<\/m$newuid\>\n";
}
print FH "\<\/users\>\n";
$conn->close;
close FH;
my $conf =
new Config::General(
-ConfigPath => \@path,
-ConfigFile => "$ctlFile",
-ExtendedAccess => 1,
-InterPolateVars => 1
);
my %config = $conf->getall();
$conf->save_file("$tmpctlFile");
&procCtl;
sub genCtl
{
my ($server, $last, $uid) = @_;
print FH "\t\<$server\>\n";
print FH "\t\tlastLogin $last\n";
print FH "\t\<\/$server\>\n";
print FH "\t\tlastLogin $last\n";
print FH "\t\<\/$server\>\n";
}
sub procCtl
{
my $tmpCtl =
new Config::General(
-ConfigPath => \@path,
-ConfigFile => "$tmpctlFile",
-ExtendedAccess => 1,
-InterPolateVars => 1
);
my %tmpCtl = $tmpCtl->getall();
my $goldCtl =
new Config::General(
-ConfigPath => \@path,
-ConfigFile => "$goldCtlFile",
-ExtendedAccess => 1,
-InterPolateVars => 1
);
my %goldCtl = $tmpCtl->getall();
my $tmpUser = $tmpCtl->obj("users");
my $goldUser = $goldCtl->obj("users");
foreach my $person ($tmpUser->keys("users"))
{
foreach my $server ($tmpUser->keys("$person")->obj("server"))
{
{
my $approved = $tmpCtl->obj("approvedBy");
next if ($approved);
}
}
$tmpCtl->save_file("$goldCtlFile");
}
}