diff options
41 files changed, 162 insertions, 51 deletions
@@ -61,7 +61,7 @@ REQUIREMENTS    libraries.  You will have to install the remctl client libraries in    order to build it.  remctl can be obtained from: -      http://www.eyrie.org/~eagle/software/remctl/ +      https://www.eyrie.org/~eagle/software/remctl/    The wallet client will build with either MIT Kerberos or Heimdal. @@ -304,7 +304,7 @@ SUPPORT    The wallet web page at: -      http://www.eyrie.org/~eagle/software/wallet/ +      https://www.eyrie.org/~eagle/software/wallet/    will always have the current version of this package, the current    documentation, and pointers to any additional resources. @@ -327,7 +327,7 @@ SOURCE REPOSITORY    or view the repository on the web at: -      http://git.eyrie.org/?p=kerberos/wallet.git +      https://git.eyrie.org/?p=kerberos/wallet.git    When contributing modifications, patches (possibly generated by    git-format-patch) are preferred to Git pull requests. diff --git a/client/wallet-rekey.pod b/client/wallet-rekey.pod index a36a734..e4c01b3 100644 --- a/client/wallet-rekey.pod +++ b/client/wallet-rekey.pod @@ -166,9 +166,9 @@ warranty.  kadmin(8), kinit(1), krb5.conf(5), remctl(1), remctld(8), wallet(1)  This program is part of the wallet system.  The current version is available -from L<http://www.eyrie.org/~eagle/software/wallet/>. +from L<https://www.eyrie.org/~eagle/software/wallet/>.  B<wallet-rekey> uses the remctl protocol.  For more information about -remctl, see L<http://www.eyrie.org/~eagle/software/remctl/>. +remctl, see L<https://www.eyrie.org/~eagle/software/remctl/>.  =cut diff --git a/client/wallet.pod b/client/wallet.pod index 672f0e4..2033fec 100644 --- a/client/wallet.pod +++ b/client/wallet.pod @@ -500,9 +500,9 @@ warranty.  kadmin(8), kinit(1), krb5.conf(5), remctl(1), remctld(8)  This program is part of the wallet system.  The current version is available -from L<http://www.eyrie.org/~eagle/software/wallet/>. +from L<https://www.eyrie.org/~eagle/software/wallet/>.  B<wallet> uses the remctl protocol.  For more information about remctl, -see L<http://www.eyrie.org/~eagle/software/remctl/>. +see L<https://www.eyrie.org/~eagle/software/remctl/>.  =cut diff --git a/docs/design b/docs/design index 8f4b20d..0d71931 100644 --- a/docs/design +++ b/docs/design @@ -43,7 +43,7 @@ Assumptions      the client, and that data passed between the server and the client is      encrypted.  For more information about the remctl protocol, see: -        <http://www.eyrie.org/~eagle/software/remctl/protocol.html> +        <https://www.eyrie.org/~eagle/software/remctl/protocol.html>      remctl requires Kerberos v5 authentication, and therefore all clients      using the wallet to retrieve data will use Kerberos v5 authentication. diff --git a/perl/lib/Wallet/ACL.pm b/perl/lib/Wallet/ACL.pm index fa414a6..312ce88 100644 --- a/perl/lib/Wallet/ACL.pm +++ b/perl/lib/Wallet/ACL.pm @@ -732,7 +732,7 @@ caller should call error() to get the error message.  Wallet::ACL::Base(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/ACL/Base.pm b/perl/lib/Wallet/ACL/Base.pm index 368f3aa..e5e304d 100644 --- a/perl/lib/Wallet/ACL/Base.pm +++ b/perl/lib/Wallet/ACL/Base.pm @@ -127,7 +127,7 @@ error string.  Wallet::ACL(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/ACL/External.pm b/perl/lib/Wallet/ACL/External.pm index dfa924d..fb4b61b 100644 --- a/perl/lib/Wallet/ACL/External.pm +++ b/perl/lib/Wallet/ACL/External.pm @@ -183,7 +183,7 @@ remctld(8), Wallet::ACL(3), Wallet::ACL::Base(3), Wallet::Config(3),  wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/ACL/Krb5.pm b/perl/lib/Wallet/ACL/Krb5.pm index a2b78e6..9764391 100644 --- a/perl/lib/Wallet/ACL/Krb5.pm +++ b/perl/lib/Wallet/ACL/Krb5.pm @@ -113,7 +113,7 @@ The PRINCIPAL parameter to check() was undefined or the empty string.  Wallet::ACL(3), Wallet::ACL::Base(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/ACL/Krb5/Regex.pm b/perl/lib/Wallet/ACL/Krb5/Regex.pm index f91d377..39a71d3 100644 --- a/perl/lib/Wallet/ACL/Krb5/Regex.pm +++ b/perl/lib/Wallet/ACL/Krb5/Regex.pm @@ -121,7 +121,7 @@ The ACL parameter to check() was undefined or the empty string.  Wallet::ACL(3), Wallet::ACL::Base(3), Wallet::ACL::Krb5(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/ACL/LDAP/Attribute.pm b/perl/lib/Wallet/ACL/LDAP/Attribute.pm index 618d56b..7bb1c68 100644 --- a/perl/lib/Wallet/ACL/LDAP/Attribute.pm +++ b/perl/lib/Wallet/ACL/LDAP/Attribute.pm @@ -251,7 +251,7 @@ The PRINCIPAL parameter to check() was undefined or the empty string.  Wallet::ACL(3), Wallet::ACL::Base(3), Wallet::Config(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/ACL/LDAP/Attribute/Root.pm b/perl/lib/Wallet/ACL/LDAP/Attribute/Root.pm index 920ad7b..079dadb 100644 --- a/perl/lib/Wallet/ACL/LDAP/Attribute/Root.pm +++ b/perl/lib/Wallet/ACL/LDAP/Attribute/Root.pm @@ -113,7 +113,7 @@ Net::Remctl(3), Wallet::ACL(3), Wallet::ACL::Base(3),  Wallet::ACL::LDAP::Attribute(3), Wallet::Config(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHORS diff --git a/perl/lib/Wallet/ACL/Nested.pm b/perl/lib/Wallet/ACL/Nested.pm index 860b8e6..efaf5a9 100644 --- a/perl/lib/Wallet/ACL/Nested.pm +++ b/perl/lib/Wallet/ACL/Nested.pm @@ -177,7 +177,7 @@ will generally come from the nested child ACL.  Wallet::ACL(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/ACL/NetDB.pm b/perl/lib/Wallet/ACL/NetDB.pm index 5ded572..8a170ba 100644 --- a/perl/lib/Wallet/ACL/NetDB.pm +++ b/perl/lib/Wallet/ACL/NetDB.pm @@ -252,10 +252,10 @@ wallet-backend(8)  NetDB is a free software system for managing DNS, DHCP, and related  machine information for large organizations.  For more information on -NetDB, see L<http://www.stanford.edu/group/networking/netdb/>. +NetDB, see L<https://web.stanford.edu/group/networking/netdb/>.  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/ACL/NetDB/Root.pm b/perl/lib/Wallet/ACL/NetDB/Root.pm index 7ab9e1b..8ae510d 100644 --- a/perl/lib/Wallet/ACL/NetDB/Root.pm +++ b/perl/lib/Wallet/ACL/NetDB/Root.pm @@ -112,10 +112,10 @@ Wallet::ACL::NetDB(3), Wallet::Config(3), wallet-backend(8)  NetDB is a free software system for managing DNS, DHCP, and related  machine information for large organizations.  For more information on -NetDB, see L<http://www.stanford.edu/group/networking/netdb/>. +NetDB, see L<https://web.stanford.edu/group/networking/netdb/>.  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Admin.pm b/perl/lib/Wallet/Admin.pm index 77f8247..ccd0932 100644 --- a/perl/lib/Wallet/Admin.pm +++ b/perl/lib/Wallet/Admin.pm @@ -375,7 +375,7 @@ much as possible.  Returns true on success and false on failure.  wallet-admin(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Config.pm b/perl/lib/Wallet/Config.pm index ec50f4b..14731d3 100644 --- a/perl/lib/Wallet/Config.pm +++ b/perl/lib/Wallet/Config.pm @@ -1055,7 +1055,7 @@ __END__  DBI(3), Wallet::Object::Keytab(3), Wallet::Server(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Database.pm b/perl/lib/Wallet/Database.pm index 9c0129b..2549d06 100644 --- a/perl/lib/Wallet/Database.pm +++ b/perl/lib/Wallet/Database.pm @@ -111,7 +111,7 @@ configuration.  DBI(3), Wallet::Config(3)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Kadmin.pm b/perl/lib/Wallet/Kadmin.pm index 7239f4b..f46bd14 100644 --- a/perl/lib/Wallet/Kadmin.pm +++ b/perl/lib/Wallet/Kadmin.pm @@ -232,7 +232,7 @@ as binary data.  On failure, returns undef and sets the object error.  kadmin(8), Wallet::Config(3), Wallet::Object::Keytab(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHORS diff --git a/perl/lib/Wallet/Kadmin/AD.pm b/perl/lib/Wallet/Kadmin/AD.pm index 9dfca79..5bb662d 100644 --- a/perl/lib/Wallet/Kadmin/AD.pm +++ b/perl/lib/Wallet/Kadmin/AD.pm @@ -543,7 +543,7 @@ msktutil, Wallet::Config(3), Wallet::Kadmin(3),  Wallet::Object::Keytab(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHORS diff --git a/perl/lib/Wallet/Kadmin/Heimdal.pm b/perl/lib/Wallet/Kadmin/Heimdal.pm index eb1b9a6..a8bc4dd 100644 --- a/perl/lib/Wallet/Kadmin/Heimdal.pm +++ b/perl/lib/Wallet/Kadmin/Heimdal.pm @@ -302,7 +302,7 @@ kadmin(8), Wallet::Config(3), Wallet::Kadmin(3),  Wallet::Object::Keytab(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHORS diff --git a/perl/lib/Wallet/Kadmin/MIT.pm b/perl/lib/Wallet/Kadmin/MIT.pm index c4ba3eb..b4143af 100644 --- a/perl/lib/Wallet/Kadmin/MIT.pm +++ b/perl/lib/Wallet/Kadmin/MIT.pm @@ -312,7 +312,7 @@ kadmin(8), Wallet::Config(3), Wallet::Kadmin(3),  Wallet::Object::Keytab(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHORS diff --git a/perl/lib/Wallet/Object/Base.pm b/perl/lib/Wallet/Object/Base.pm index bee6e94..0c88e8a 100644 --- a/perl/lib/Wallet/Object/Base.pm +++ b/perl/lib/Wallet/Object/Base.pm @@ -1048,7 +1048,7 @@ the change in the setting.  wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Object/Duo.pm b/perl/lib/Wallet/Object/Duo.pm index 9870339..87212ba 100644 --- a/perl/lib/Wallet/Object/Duo.pm +++ b/perl/lib/Wallet/Object/Duo.pm @@ -449,7 +449,7 @@ Only one Duo account is supported for a given wallet implementation.  Net::Duo(3), Wallet::Config(3), Wallet::Object::Base(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Object/File.pm b/perl/lib/Wallet/Object/File.pm index da80f5e..8811fd3 100644 --- a/perl/lib/Wallet/Object/File.pm +++ b/perl/lib/Wallet/Object/File.pm @@ -284,7 +284,7 @@ impose a length limitation on the file object name.  remctld(8), Wallet::Config(3), Wallet::Object::Base(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Object/Keytab.pm b/perl/lib/Wallet/Object/Keytab.pm index 87d88cc..21cea91 100644 --- a/perl/lib/Wallet/Object/Keytab.pm +++ b/perl/lib/Wallet/Object/Keytab.pm @@ -522,7 +522,7 @@ wallet database do not have realm information.  kadmin(8), Wallet::Config(3), Wallet::Object::Base(3), wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Object/Password.pm b/perl/lib/Wallet/Object/Password.pm index 0c5165a..8218371 100644 --- a/perl/lib/Wallet/Object/Password.pm +++ b/perl/lib/Wallet/Object/Password.pm @@ -215,7 +215,7 @@ remctld(8), Wallet::Config(3), Wallet::Object::File(3),  wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Object/WAKeyring.pm b/perl/lib/Wallet/Object/WAKeyring.pm index 89a78a4..d763cc5 100644 --- a/perl/lib/Wallet/Object/WAKeyring.pm +++ b/perl/lib/Wallet/Object/WAKeyring.pm @@ -358,7 +358,7 @@ underscores, and dashes replaced by "%" and the hex code of the character.  Wallet::Config(3), Wallet::Object::Base(3), wallet-backend(8), WebAuth(3)  This module is part of the wallet system. The current version is available -from <http://www.eyrie.org/~eagle/software/wallet/>. +from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Policy/Stanford.pm b/perl/lib/Wallet/Policy/Stanford.pm index 55ed7aa..6b1b007 100644 --- a/perl/lib/Wallet/Policy/Stanford.pm +++ b/perl/lib/Wallet/Policy/Stanford.pm @@ -538,11 +538,11 @@ configuration file from this module or wrapped to apply additional rules.  Wallet::Config(3) -The L<Stanford policy|http://www.eyrie.org/~eagle/software/wallet/naming.html> +The L<Stanford policy|https://www.eyrie.org/~eagle/software/wallet/naming.html>  implemented by this module.  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Report.pm b/perl/lib/Wallet/Report.pm index 4b1ee17..5c154a1 100644 --- a/perl/lib/Wallet/Report.pm +++ b/perl/lib/Wallet/Report.pm @@ -869,7 +869,7 @@ the error message if there was an error and undef if there was no error.  Wallet::Config(3), Wallet::Server(3)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Schema.pm b/perl/lib/Wallet/Schema.pm index 6b3de39..d535b5c 100644 --- a/perl/lib/Wallet/Schema.pm +++ b/perl/lib/Wallet/Schema.pm @@ -351,7 +351,7 @@ configuration.  wallet-backend(8), Wallet::Config(3)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/lib/Wallet/Server.pm b/perl/lib/Wallet/Server.pm index b2718f5..ae65932 100644 --- a/perl/lib/Wallet/Server.pm +++ b/perl/lib/Wallet/Server.pm @@ -1183,7 +1183,7 @@ failure.  wallet-backend(8)  This module is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =head1 AUTHOR diff --git a/perl/t/verifier/basic.t b/perl/t/verifier/basic.t index ce44d44..be3c427 100755 --- a/perl/t/verifier/basic.t +++ b/perl/t/verifier/basic.t @@ -46,9 +46,9 @@ is ($verifier->error, 'malformed krb5 ACL', ' and right error');  $verifier = Wallet::ACL::Krb5::Regex->new;  isa_ok ($verifier, 'Wallet::ACL::Krb5::Regex', 'krb5-regex verifier'); -is ($verifier->check ('rra@stanford.edu', '.*@stanford\.edu\z'), 1, +is ($verifier->check ('thoron@stanford.edu', '.*@stanford\.edu\z'), 1,      'Simple check'); -is ($verifier->check ('rra@stanford.edu', '^a.*@stanford\.edu'), 0, +is ($verifier->check ('thoron@stanford.edu', '^a.*@stanford\.edu'), 0,      'Simple failure');  is ($verifier->error, undef, 'No error set');  is ($verifier->check (undef, '^rra@stanford\.edu\z'), undef, diff --git a/perl/t/verifier/ldap-attr.t b/perl/t/verifier/ldap-attr.t index cff3b63..3665edb 100755 --- a/perl/t/verifier/ldap-attr.t +++ b/perl/t/verifier/ldap-attr.t @@ -6,7 +6,8 @@  # access to the LDAP server and will be skipped in all other environments.  #  # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2012, 2013, 2014 +# Copyright 2018 Russ Allbery <eagle@eyrie.org> +# Copyright 2012-2014  #     The Board of Trustees of the Leland Stanford Junior University  #  # See LICENSE for licensing terms. @@ -17,11 +18,12 @@ use warnings;  use Test::More;  use lib 't/lib'; +use Test::RRA qw(skip_unless_author);  use Util; -# Skip all spelling tests unless the maintainer environment variable is set. -plan skip_all => 'LDAP verifier tests only run for maintainer' -    unless $ENV{RRA_MAINTAINER_TESTS}; +# This test requires a specific environment setup, so only run it for package +# maintainers. +skip_unless_author('LDAP verifier tests');  # Declare a plan.  plan tests => 22; @@ -49,7 +51,7 @@ package main;  # Determine the local principal.  my $klist = `klist 2>&1` || '';  SKIP: { -    skip "tests useful only with Stanford Kerberos tickets", 9 +    skip "tests useful only with Stanford Kerberos tickets", 20          unless ($klist =~ /[Pp]rincipal: \S+\@stanford\.edu$/m);      # Set up our configuration. diff --git a/perl/t/verifier/netdb.t b/perl/t/verifier/netdb.t index 7048ef9..200fc9e 100755 --- a/perl/t/verifier/netdb.t +++ b/perl/t/verifier/netdb.t @@ -7,6 +7,7 @@  # environments.  #  # Written by Russ Allbery <eagle@eyrie.org> +# Copyright 2018 Russ Allbery <eagle@eyrie.org>  # Copyright 2008, 2014  #     The Board of Trustees of the Leland Stanford Junior University  # @@ -20,11 +21,16 @@ use Test::More tests => 5;  use Wallet::ACL::NetDB;  use lib 't/lib'; +use Test::RRA qw(skip_unless_author);  use Util; +# This test requires a specific environment setup, so only run it for package +# maintainers. +skip_unless_author('LDAP verifier tests'); +  my $netdb = 'netdb-node-roles-rc.stanford.edu';  my $host  = 'windlord.stanford.edu'; -my $user  = 'rra@stanford.edu'; +my $user  = 'jonrober@stanford.edu';  # Determine the local principal.  my $klist = `klist 2>&1` || ''; diff --git a/server/keytab-backend.in b/server/keytab-backend.in index 56c375b..a029e6c 100644 --- a/server/keytab-backend.in +++ b/server/keytab-backend.in @@ -241,6 +241,6 @@ DEALINGS IN THE SOFTWARE.  kadmin.local(8), remctld(8)  This program is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =cut diff --git a/server/wallet-admin.in b/server/wallet-admin.in index 6c18b82..c2d5bf8 100644 --- a/server/wallet-admin.in +++ b/server/wallet-admin.in @@ -171,6 +171,6 @@ DEALINGS IN THE SOFTWARE.  Wallet::Admin(3), Wallet::Config(3), wallet-backend(8)  This program is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =cut diff --git a/server/wallet-backend.in b/server/wallet-backend.in index 4803f96..4937b66 100644 --- a/server/wallet-backend.in +++ b/server/wallet-backend.in @@ -691,6 +691,6 @@ DEALINGS IN THE SOFTWARE.  Wallet::Server(3), remctld(8)  This program is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =cut diff --git a/server/wallet-report.in b/server/wallet-report.in index 10a3b00..4c96e7e 100644 --- a/server/wallet-report.in +++ b/server/wallet-report.in @@ -356,6 +356,6 @@ DEALINGS IN THE SOFTWARE.  Wallet::Config(3), Wallet::Report(3), wallet-backend(8)  This program is part of the wallet system.  The current version is -available from L<http://www.eyrie.org/~eagle/software/wallet/>. +available from L<https://www.eyrie.org/~eagle/software/wallet/>.  =cut diff --git a/tests/TESTS b/tests/TESTS index 76bd4ae..a2c672e 100644 --- a/tests/TESTS +++ b/tests/TESTS @@ -14,6 +14,7 @@ portable/snprintf  server/admin  server/backend  server/keytab +style/obsolete-strings  util/messages  util/messages-krb5  util/xmalloc diff --git a/tests/style/obsolete-strings-t b/tests/style/obsolete-strings-t new file mode 100755 index 0000000..b3d8fd4 --- /dev/null +++ b/tests/style/obsolete-strings-t @@ -0,0 +1,102 @@ +#!/usr/bin/perl +# +# Check for obsolete strings in source files. +# +# Examine all source files in a distribution for obsolete strings and report +# on files that fail this check.  This catches various transitions I want to +# do globally in all my packages, like changing my personal URLs to https. +# +# The canonical version of this file is maintained in the rra-c-util package, +# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>. +# +# Copyright 2016, 2018 Russ Allbery <eagle@eyrie.org> +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +# SPDX-License-Identifier: MIT + +use 5.006; +use strict; +use warnings; + +use lib "$ENV{C_TAP_SOURCE}/tap/perl"; + +use File::Basename qw(basename); +use Test::More; +use Test::RRA qw(skip_unless_author); +use Test::RRA::Automake qw(all_files automake_setup); + +# Bad patterns to search for. +my @BAD_REGEXES = (qr{ http:// \S+ [.]eyrie[.]org }xms); +my @BAD_STRINGS = qw(rra@stanford.edu RRA_MAINTAINER_TESTS); + +# File names to exclude from this check. +my %EXCLUDE = map { $_ => 1 } qw(NEWS obsolete-strings.t obsolete-strings-t); + +# Only run this test for the package author, since it doesn't indicate any +# user-noticable flaw in the package itself. +skip_unless_author('Obsolete strings tests'); + +# Set up Automake testing. +automake_setup(); + +# Check a single file for one of the bad patterns. +# +# $path - Path to the file +# +# Returns: undef +sub check_file { +    my ($path) = @_; +    my $filename = basename($path); + +    # Ignore excluded and binary files. +    return if $EXCLUDE{$filename}; +    return if !-T $path; + +    # Scan the file. +    open(my $fh, '<', $path) or BAIL_OUT("Cannot open $path"); +    while (defined(my $line = <$fh>)) { +        for my $regex (@BAD_REGEXES) { +            if ($line =~ $regex) { +                ok(0, "$path contains $regex"); +                close($fh) or BAIL_OUT("Cannot close $path"); +                return; +            } +        } +        for my $string (@BAD_STRINGS) { +            if (index($line, $string) != -1) { +                ok(0, "$path contains $string"); +                close($fh) or BAIL_OUT("Cannot close $path"); +                return; +            } +        } +    } +    close($fh) or BAIL_OUT("Cannot close $path"); +    ok(1, $path); +    return; +} + +# Scan every file for any of the bad patterns or strings.  We don't declare a +# plan since we skip a lot of files and don't want to precalculate the file +# list. +my @paths = all_files(); +for my $path (@paths) { +    check_file($path); +} +done_testing(); diff --git a/tests/tap/perl/Test/RRA/Automake.pm b/tests/tap/perl/Test/RRA/Automake.pm index 804c193..3ba5bcb 100644 --- a/tests/tap/perl/Test/RRA/Automake.pm +++ b/tests/tap/perl/Test/RRA/Automake.pm @@ -73,7 +73,7 @@ BEGIN {  # Directories to skip globally when looking for all files, or for directories  # that could contain Perl files. -my @GLOBAL_SKIP = qw(.git _build autom4te.cache build-aux); +my @GLOBAL_SKIP = qw(.git autom4te.cache build-aux perl/_build perl/blib);  # Additional paths to skip when building a list of all files in the  # distribution.  This primarily skips build artifacts that aren't interesting  | 
