debian/0000755000000000000000000000000012204700473007165 5ustar debian/rules0000755000000000000000000000003612204700473010244 0ustar #!/usr/bin/make -f %: dh $@ debian/control0000644000000000000000000000276212204700473010577 0ustar Source: libapache-authznetldap-perl Maintainer: Debian Perl Group Uploaders: AGOSTINI Yves Section: perl Priority: optional Build-Depends: debhelper (>= 8) Build-Depends-Indep: perl, libapache2-mod-perl2, libconvert-asn1-perl, libextutils-autoinstall-perl, libmime-base64-urlsafe-perl, libnet-ldap-perl, liburi-perl Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libapache-authznetldap-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libapache-authznetldap-perl.git Homepage: https://metacpan.org/release/Apache-AuthzNetLDAP/ Package: libapache-authznetldap-perl Architecture: all Depends: ${perl:Depends}, ${misc:Depends}, libapache2-mod-perl2, libconvert-asn1-perl, libmime-base64-urlsafe-perl, libnet-ldap-perl, liburi-perl Description: Apache-Perl module that enables to authorize a user with LDAP attributes After you have authenticated a user (perhaps with Apache::AuthNetLDAP ;) you can use Apache::AuthzNetLDAP to determine whether they are authorized to access the Web resource under this modules control. . You can control authorization via one of four methods. The first two are the pretty standard user and valid-user require, the second two are group or ldap-url which are unique to LDAP. debian/source/0000755000000000000000000000000012204700473010465 5ustar debian/source/format0000644000000000000000000000001412204700473011673 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000541512204700473011044 0ustar libapache-authznetldap-perl (0.07-5) unstable; urgency=low * Team upload. [ Nathan Handler ] * debian/watch: Update to ignore development releases. [ Ansgar Burchardt ] * debian/control: Convert Vcs-* fields to Git. [ gregor herrmann ] * debian/control: update {versioned,alternative} (build) dependencies. [ Salvatore Bonaccorso ] * Change search.cpan.org based URIs to metacpan.org based URIs [ gregor herrmann ] * Switch to "3.0 (quilt)" source format. * Drop quilt fragments. * Use tiny debian/rules. * Bump debhelper compatibility level to 8. * Add patch to make Makefile.PL work with Perl 5.18. Thanks to brian m. carlson for the patch. (Closes: #719972) * debian/copyright: switch formatting to Copyright-Format 1.0. * Declare compliance with Debian Policy 3.9.4. -- gregor herrmann Tue, 20 Aug 2013 16:46:00 +0200 libapache-authznetldap-perl (0.07-4) unstable; urgency=low * Reintroduce package with patch for recent apache2 (Closes: #481497) -- AGOSTINI Yves Wed, 25 Jun 2008 20:43:46 +0200 libapache-authznetldap-perl (0.7-3) unstable; urgency=low * Updated section to "perl" * Change dependency on libapache-authnetldap-perl to suggests * Remove apache-perl from dependency condition (it depends on libapache-mod-perl now, anyway) -- Steve Haslam Mon, 15 Mar 2004 16:04:02 +0000 libapache-authznetldap-perl (0.7-2) unstable; urgency=low * Add build dependency on libapache-mod-perl (Closes: #238072) -- Steve Haslam Mon, 15 Mar 2004 15:54:13 +0000 libapache-authznetldap-perl (0.7-1) unstable; urgency=low * New upstream release * Update packaging stuff to be reasonably modern * Change depends on libapache-mod-perl to allow for apache-perl or libapache2-mod-perl2 * Default to version 3 binds-- override with "LDAPVersion" in Apache config (e.g. "PerlSetVar LDAPVersion 2") (Closes: #190325) -- Steve Haslam Sat, 13 Mar 2004 00:32:52 +0000 libapache-authznetldap-perl (0.3-3) unstable; urgency=low * Changed BUild-Depends to Build-Depends-Indep * Updated Standards-Version * Use the binary-indep target, not binary-arch (Closes: 157541) * Added the copyright notice from /usr/share/doc/perl/copyright into the copyright file (Closes: 157541) -- Steve Haslam Wed, 21 Aug 2002 00:11:49 +0100 libapache-authznetldap-perl (0.3-2) unstable; urgency=low * Updated to catch up with Perl policy (vendor install dirs) * Added Build-Depends on debhelper and perl -- Steve Haslam Sun, 29 Apr 2001 00:58:38 +0100 libapache-authznetldap-perl (0.3-1) unstable; urgency=low * Initial Release. -- Steve Haslam Tue, 2 May 2000 12:10:15 +0100 debian/compat0000644000000000000000000000000212204700473010363 0ustar 8 debian/patches/0000755000000000000000000000000012204700473010614 5ustar debian/patches/perl-5.18-build.patch0000644000000000000000000000166312204700473014273 0ustar Description: fix Makefile.PL to work with perl 5.18 Origin: vendor Bug-Debian: http://bugs.debian.org/719972 Bug: https://rt.cpan.org/Ticket/Display.html?id=87975 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=87975 Author: "brian m. carlson" Reviewed-by: gregor herrmann Last-Update: 2013-08-20 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,7 +2,7 @@ # ExtUtils::AutoInstall Bootstrap Code, version 7. BEGIN{my$p='ExtUtils::AutoInstall';my$v=0.52;$p->VERSION||0>=$v or+eval"use $p $v;1"or+do{my$e=$ENV{PERL_EXTUTILS_AUTOINSTALL}; - (!defined($e)||$e!~m/--(?:default|skip|testonly)/and-t STDIN or + (!defined($e)||$e!~m/--(?:default|skip|testonly)/ and-t STDIN or eval"use ExtUtils::MakeMaker;WriteMakefile(PREREQ_PM=>{'$p',$v} );1"and exit)and print"==> $p $v required. Install it from CP". "AN? [Y/n] "and!~/^n/i and print"*** Installing $p\n"and debian/patches/makefile-for-apache2.patch0000644000000000000000000000071412204700473015501 0ustar Description: adjust Makefile.PL for mod_perl2 Origin: vendor Forwarded: no Author: AGOSTINI Yves Reviewed-by: gregor herrmann Last-Update: 2013-08-20 --- a/Makefile.PL +++ b/Makefile.PL @@ -44,7 +44,7 @@ Net::LDAP => '', MIME::Base64 => '', URI => '', - mod_perl => '', + mod_perl2 => '', ], # core modules; may also be 'all' ); debian/patches/series0000644000000000000000000000010312204700473012023 0ustar makefile-for-apache2.patch new-apache2.patch perl-5.18-build.patch debian/patches/new-apache2.patch0000644000000000000000000001514412204700473013734 0ustar Description: adjust for apache2 Origin: vendor Forwarded: no Author: AGOSTINI Yves Reviewed-by: gregor herrmann Last-Update: 2013-08-20 --- a/AuthzNetLDAP.pm +++ b/AuthzNetLDAP.pm @@ -9,7 +9,13 @@ require DynaLoader; require AutoLoader; use Net::LDAP; -use mod_perl; +BEGIN { + eval { + require mod_perl; + import mod_perl ; + }; + if ($@) { require mod_perl2; import mod_perl2; }; +}; @ISA = qw(Exporter DynaLoader); # Items to export into callers namespace by default. Note: do not export @@ -28,15 +34,15 @@ use constant MP2 => ($mod_perl::VERSION # test for the version of mod_perl, and use the appropriate libraries BEGIN { if (MP2) { - require Apache::Const; - require Apache::Access; - require Apache::Connection; - require Apache::Log; - require Apache::RequestRec; - require Apache::RequestUtil; + require Apache2::Const; + require Apache2::Access; + require Apache2::Connection; + require Apache2::Log; + require Apache2::RequestRec; + require Apache2::RequestUtil; require URI; require URI::ldap; - Apache::Const->import(-compile => 'HTTP_UNAUTHORIZED','OK', 'DECLINED'); + Apache2::Const->import(-compile => 'HTTP_UNAUTHORIZED','OK', 'DECLINED'); } else { require Apache::Constants; require URI; @@ -63,7 +69,7 @@ sub handler my $requires = $r->requires; - return MP2 ? Apache::DECLINED : Apache::Constants::DECLINED unless $requires; + return MP2 ? Apache2::Const::DECLINED : Apache::Constants::DECLINED unless $requires; my $username = MP2 ? $r->user : $r->connection->user; @@ -88,7 +94,7 @@ sub handler { $r->note_basic_auth_failure; MP2 ? $r->log_error("user $username: LDAP Connection Failed: $error",$r->uri) : $r->log_reason("user $username: LDAP Connection Failed: $error",$r->uri); - return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; } #first let's get the user's DN @@ -105,7 +111,7 @@ sub handler { $r->note_basic_auth_failure; MP2 ? $r->log_error("user $username: LDAP Connection Failed: $error",$r->uri) : $r->log_reason("user $username: LDAP Connection Failed: $error",$r->uri); - return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; } my $entry = $mesg->shift_entry(); @@ -120,7 +126,7 @@ sub handler my ($requirement,@rest) = split(/\s+/, $req->{requirement}); if (lc $requirement eq 'user') { - foreach (@rest) {return MP2 ? Apache::OK : Apache::Constants::OK if $username eq $_;} + foreach (@rest) {return MP2 ? Apache2::Const::OK : Apache::Constants::OK if $username eq $_;} } elsif (lc $requirement eq 'group') { @@ -129,23 +135,23 @@ sub handler my ($foo,$group) = split(/"/,$req->{requirement}); my $isMember = Apache::AuthzNetLDAP::_getIsMember($ldap,$r,$group,$entry->dn()); MP2 ? $r->log_error("user $username: group($group) DEBUG - isMember: $isMember",$r->uri) : $r->log_reason("user $username: group($group) DEBUG - isMember: $isMember",$r->uri); - return MP2 ? Apache::OK : Apache::Constants::OK if $isMember; + return MP2 ? Apache2::Const::OK : Apache::Constants::OK if $isMember; } elsif (lc $requirement eq 'ldap-url') { my ($foo,$url) = split (/ldap-url/,$req->{requirement}); my $isMember = Apache::AuthzNetLDAP::_checkURL($r,$ldap,$entry->dn(),$url); MP2 ? $r->log_error("user $username: group($url) DEBUG - isMember: $isMember",$r->uri) : $r->log_reason("user $username: group($url) DEBUG - isMember: $isMember",$r->uri); - return MP2 ? Apache::OK : Apache::Constants::OK if $isMember; + return MP2 ? Apache2::Const::OK : Apache::Constants::OK if $isMember; } elsif (lc $requirement eq 'valid-user') { - return MP2 ? Apache::OK : Apache::Constants::OK; + return MP2 ? Apache2::Const::OK : Apache::Constants::OK; } } $r->note_basic_auth_failure; MP2 ? $r->log_error("user $username: group (test) LDAP membership check failed with ismember: DEBUG REMOVE COMMENT",$r->uri) : $r->log_reason("user $username: group (test) LDAP membership check failed with ismember: DEBUG REMOVE COMMENT",$r->uri); - return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; @@ -206,7 +212,7 @@ sub _getIsMember { $r->note_basic_auth_failure; MP2 ? $r->log_error("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri) : $r->log_reason("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri); - return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; } my $entry = $mesg->pop_entry(); @@ -236,7 +242,7 @@ sub _getIsMember { $r->note_basic_auth_failure; MP2 ? $r->log_error("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri) : $r->log_reason("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri); - return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; } #if we find an entry it returns true @@ -280,7 +286,7 @@ sub _getIsMember { $r->note_basic_auth_failure; MP2 ? $r->log_error("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri) : $r->log_reason("user $userDN: group ($groupDN) LDAP search Failed: $error",$r->uri); - return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; } #if make it this far then you must be a member @@ -312,7 +318,7 @@ sub _checkURL { $r->note_basic_auth_failure; MP2 ? $r->log_error("user $userDN: group ($urlval) LDAP search Failed: $error",$r->uri) : $r->log_reason("user $userDN: group ($urlval) LDAP search Failed: $error",$r->uri); - return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; + return MP2 ? Apache2::Const::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED; } #if we find an entry it returns true debian/copyright0000644000000000000000000000275012204700473011124 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: https://metacpan.org/release/Apache-AuthzNetLDAP Upstream-Contact: Shannon Eric Peevey speeves@unt.edu Upstream-Name: Apache-AuthzNetLDAP Files: * Copyright: 2000, 2003, Mark Wilcox mewilcox@unt.edu 2000, 2003, Shannon Eric Peevey speeves@unt.edu License: Artistic or GPL-1+ Comment: The upstream distribution does not contain an explicit statement of copyright ownership. Pursuant to the Berne Convention for the Protection of Literary and Artistic Works, it is assumed that all content is copyright by its respective authors unless otherwise stated. Files: debian/* Copyright: 2000, 2001, 2002, 2004, Steve Haslam 2008, 2013, gregor herrmann 2008, AGOSTINI Yves License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/watch0000644000000000000000000000020412204700473010212 0ustar version=3 https://metacpan.org/release/Apache-AuthzNetLDAP/ .*/Apache-AuthzNetLDAP-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$