]> git.proxmox.com Git - pve-access-control.git/commitdiff
fix various perlcritic lints
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 13:45:38 +0000 (15:45 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 13:46:48 +0000 (15:46 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 files changed:
src/PVE/Auth/PAM.pm
src/test/auth-test.pl
src/test/dump-perm.pl
src/test/dump-users.pl
src/test/parser_writer.pl
src/test/perm-test1.pl
src/test/perm-test2.pl
src/test/perm-test3.pl
src/test/perm-test4.pl
src/test/perm-test5.pl
src/test/perm-test6.pl
src/test/perm-test7.pl
src/test/perm-test8.pl

index d016f834f9e3ec92b87e86ffc36a6ea42d45f15c..f19320d4e4496fc10f34934f02cdc989fcb8222c 100755 (executable)
@@ -27,7 +27,7 @@ sub authenticate_user {
     # user (www-data) need to be able to read /etc/passwd /etc/shadow
     die "no password\n" if !$password;
 
-    my $pamh = new Authen::PAM('proxmox-ve-auth', $username, sub {
+    my $pamh = Authen::PAM->new('proxmox-ve-auth', $username, sub {
        my @res;
        while(@_) {
            my $msg_type = shift;
index 60429a98c36daf348a046c8a84f637fbbd366c97..1a5addd57823e527fffc8012ed2030c73f3b014d 100644 (file)
@@ -1,7 +1,10 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
+
 use PVE::PTY;
+
 use PVE::AccessControl;
 
 my $username = shift;
index cb2a2eebde5c89921fe4c4be10a671d1e1b04342..16bf6c89bdbed67010c9af97c810667f2ddff851 100755 (executable)
@@ -1,9 +1,12 @@
 #!/usr/bin/perl -w
 
 use strict;
-use PVE::RPCEnvironment;
-use Getopt::Long;
+use warnings;
+
 use Data::Dumper;
+use Getopt::Long;
+
+use PVE::RPCEnvironment;
 
 # example: 
 # dump-perm.pl -f myuser.cfg root /
index f08d30bac709e668361d8b7671c7ad44a0d23acf..ebbb0017dc1b8455e93ff8d7b0c2998be691f00e 100755 (executable)
@@ -1,9 +1,12 @@
 #!/usr/bin/perl -w
 
 use strict;
-use PVE::AccessControl;
+use warnings;
+
 use Data::Dumper;
 
+use PVE::AccessControl;
+
 my $cfg;
 
 $cfg = PVE::AccessControl::load_user_config();
index a5c6227691b8f0cb9831c6983709413e615610ec..65a70eb175d21eb3e8b6e25bf96b2c2cd295eb39 100755 (executable)
@@ -1,11 +1,12 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
 
+use Storable qw(dclone);
 use Test::More;
-use PVE::AccessControl;
 
-use Storable qw(dclone);
+use PVE::AccessControl;
 
 PVE::AccessControl::create_roles();
 my $default_user_cfg = {};
index 12c95dbace5695b5d159025f88e077224fe80849..d8527e7a125d3a3ac12bf3d3aa209a8132751e29 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
+
+use Getopt::Long;
+
 use PVE::Tools;
+
 use PVE::AccessControl;
 use PVE::RPCEnvironment;
-use Getopt::Long;
 
 my $rpcenv = PVE::RPCEnvironment->init('cli');
 
index 1317051c082b5c69886bf77cb8aca20470782017..fe76eff314d16fe689fe4075ca0f61405bc46cd3 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
+
+use Getopt::Long;
+
 use PVE::Tools;
+
 use PVE::AccessControl;
 use PVE::RPCEnvironment;
-use Getopt::Long;
 
 my $rpcenv = PVE::RPCEnvironment->init('cli');
 
index b7b54807ef44f758a15a415822c4f41bf184e465..7acf577e76bd5420d124ca49e7dbe79b69a45376 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
+
+use Getopt::Long;
+
 use PVE::Tools;
+
 use PVE::AccessControl;
 use PVE::RPCEnvironment;
-use Getopt::Long;
 
 my $rpcenv = PVE::RPCEnvironment->init('cli');
 
index 718963eeec2eb999b5d93a9baf35c40bfb5544de..bef4ffbe084e7b252f83590a93b7e516d3801607 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
+
+use Getopt::Long;
+
 use PVE::Tools;
+
 use PVE::AccessControl;
 use PVE::RPCEnvironment;
-use Getopt::Long;
 
 my $rpcenv = PVE::RPCEnvironment->init('cli');
 
index ebb40e369e85343d2cf382defdbf7b6f3a0cdc52..44c12b23fb9a56531e75932f4f677b58dcf9950e 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
+
+use Getopt::Long;
+
 use PVE::Tools;
+
 use PVE::AccessControl;
 use PVE::RPCEnvironment;
-use Getopt::Long;
 
 my $rpcenv = PVE::RPCEnvironment->init('cli');
 
index dd433ddd2133fa5f0e9f291cddbbbb2c279b1214..0b0d03672a8f0a3d3ea2655bcebd123f4968e326 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
+
+use Getopt::Long;
+
 use PVE::Tools;
+
 use PVE::AccessControl;
 use PVE::RPCEnvironment;
-use Getopt::Long;
 
 my $rpcenv = PVE::RPCEnvironment->init('cli');
 
index 57ece07e39315ad94b28a0180f904ebeff1a8cc5..da8535e1ea3c66308260a4be3e93d2dc1c802992 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
+
+use Getopt::Long;
+
 use PVE::Tools;
+
 use PVE::AccessControl;
 use PVE::RPCEnvironment;
-use Getopt::Long;
 
 my $rpcenv = PVE::RPCEnvironment->init('cli');
 
index 5dab6c68d1a2ac6e64054d47859785ccf5ccd12f..980a990c25a225ebcaceeab6a9b8912a85c32113 100644 (file)
@@ -1,7 +1,10 @@
 #!/usr/bin/perl -w
 
 use strict;
+use warnings;
+
 use PVE::Tools;
+
 use PVE::AccessControl;
 use PVE::RPCEnvironment;