strict/warnings compliance

This commit is contained in:
Jamie Cameron
2016-05-30 15:29:10 -07:00
parent b8951b3f7d
commit de1c3b187f
3 changed files with 16 additions and 8 deletions

View File

@@ -1,15 +1,17 @@
#!/usr/local/bin/perl
# Write an actions log for a login
# Write an actions log for a failed login
BEGIN { push(@INC, ".."); };
use strict;
use warnings;
use WebminCore;
&init_config();
($username, $sid, $remoteip, $localip) = @ARGV;
if ($username && $sid && $remoteip) {
our ($remote_user);
my ($username, $reason, $remoteip, $localip) = @ARGV;
if ($username && $reason && $remoteip) {
$WebminCore::remote_user = $remote_user = $username;
$main::session_id = $sid;
$0 = "miniserv.pl";
&webmin_log("login", undef, undef, undef, "global", undef,
&webmin_log("failed", undef, $reason, undef, "global", undef,
undef, $remoteip);
}

View File

@@ -2,10 +2,13 @@
# Write an actions log for a login
BEGIN { push(@INC, ".."); };
use strict;
use warnings;
use WebminCore;
our ($remote_user);
&init_config();
($username, $sid, $remoteip, $localip) = @ARGV;
my ($username, $sid, $remoteip, $localip) = @ARGV;
if ($username && $sid && $remoteip) {
$WebminCore::remote_user = $remote_user = $username;
$main::session_id = $sid;

View File

@@ -2,10 +2,13 @@
# Write an actions log for a logout
BEGIN { push(@INC, ".."); };
use strict;
use warnings;
use WebminCore;
our ($remote_user);
&init_config();
($username, $sid, $remoteip, $remoteip) = @ARGV;
my ($username, $sid, $remoteip, $localip) = @ARGV;
if ($username && $sid && $remoteip) {
$WebminCore::remote_user = $remote_user = $username;
$main::session_id = $sid;