diff options
author | Russ Allbery <rra@stanford.edu> | 2007-12-05 22:55:45 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-12-05 22:55:45 +0000 |
commit | f8c47d1f3cf5d4e8aa64c39120731ca9054dc786 (patch) | |
tree | 479e5d45b62e70ddfe8f15d2efc0a05cc60ca158 /perl/Wallet/ACL | |
parent | 5ad61b6ecd14adffa013ef5b0b8c2b8da8cca03b (diff) |
Various coding style fixes and cleanup based on a much-appreciated
code audit by Simon Cozens. I didn't take all of his advise, and he
shouldn't be blamed for any remaining issues.
Diffstat (limited to 'perl/Wallet/ACL')
-rw-r--r-- | perl/Wallet/ACL/Krb5.pm | 4 | ||||
-rw-r--r-- | perl/Wallet/ACL/NetDB.pm | 12 | ||||
-rw-r--r-- | perl/Wallet/ACL/NetDB/Root.pm | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/perl/Wallet/ACL/Krb5.pm b/perl/Wallet/ACL/Krb5.pm index 8c0610b..f94475f 100644 --- a/perl/Wallet/ACL/Krb5.pm +++ b/perl/Wallet/ACL/Krb5.pm @@ -35,11 +35,11 @@ sub check { my ($self, $principal, $acl) = @_; unless ($principal) { $self->error ('no principal specified'); - return undef; + return; } unless ($acl) { $self->error ('malformed krb5 ACL'); - return undef; + return; } return ($principal eq $acl) ? 1 : 0; } diff --git a/perl/Wallet/ACL/NetDB.pm b/perl/Wallet/ACL/NetDB.pm index 6437ebc..0d12703 100644 --- a/perl/Wallet/ACL/NetDB.pm +++ b/perl/Wallet/ACL/NetDB.pm @@ -65,11 +65,11 @@ sub check { my ($self, $principal, $acl) = @_; unless ($principal) { $self->error ('no principal specified'); - return undef; + return; } unless ($acl) { $self->error ('malformed netdb ACL'); - return undef; + return; } my $remctl = $self->{remctl}; if ($Wallet::Config::NETDB_REALM) { @@ -77,7 +77,7 @@ sub check { } unless ($remctl->command ('netdb', 'node-roles', $principal, $acl)) { $self->error ('cannot check NetDB ACL: ' . $remctl->error); - return undef; + return; } my ($roles, $output, $status, $error); do { @@ -90,12 +90,12 @@ sub check { } } elsif ($output->type eq 'error') { $self->error ('cannot check NetDB ACL: ' . $output->data); - return undef; + return; } elsif ($output->type eq 'status') { $status = $output->status; } else { $self->error ('malformed NetDB remctl token: ' . $output->type); - return undef; + return; } } while ($output->type eq 'output'); if ($status == 0) { @@ -115,7 +115,7 @@ sub check { } else { $self->error ("error checking NetDB ACL"); } - return undef; + return; } } diff --git a/perl/Wallet/ACL/NetDB/Root.pm b/perl/Wallet/ACL/NetDB/Root.pm index 5400d99..6ce7c88 100644 --- a/perl/Wallet/ACL/NetDB/Root.pm +++ b/perl/Wallet/ACL/NetDB/Root.pm @@ -37,7 +37,7 @@ sub check { my ($self, $principal, $acl) = @_; unless ($principal) { $self->error ('no principal specified'); - return undef; + return; } unless ($principal =~ s%^([^/\@]+)/root(\@|\z)%$1$2%) { return 0; |