diff options
author | mnag <mnag@FreeBSD.org> | 2005-10-06 00:31:43 +0800 |
---|---|---|
committer | mnag <mnag@FreeBSD.org> | 2005-10-06 00:31:43 +0800 |
commit | 214744a1a2063d8f709112f4020a916395c06bd8 (patch) | |
tree | 57183ad6005446e0cea071a5f0e635db9804d97a /security/p5-Authen-CyrusSASL | |
parent | beadbab39f5cc385aa16a0f51c72ae7e22ed3ed3 (diff) | |
download | freebsd-ports-gnome-214744a1a2063d8f709112f4020a916395c06bd8.tar.gz freebsd-ports-gnome-214744a1a2063d8f709112f4020a916395c06bd8.tar.zst freebsd-ports-gnome-214744a1a2063d8f709112f4020a916395c06bd8.zip |
New port
The Authen::CyrusSASL module provides a simple class that allows you
to send request to the cyrus-sasl's authen daemon.
This module is based on the Authen::Radius module with the similar interface.
PR: 86943
Submitted by: Attila Nagy <bra@fsn.hu>
Approved by: pav (mentor)
Diffstat (limited to 'security/p5-Authen-CyrusSASL')
-rw-r--r-- | security/p5-Authen-CyrusSASL/Makefile | 27 | ||||
-rw-r--r-- | security/p5-Authen-CyrusSASL/distinfo | 2 | ||||
-rw-r--r-- | security/p5-Authen-CyrusSASL/files/patch-CyrusSASL.pm | 49 | ||||
-rw-r--r-- | security/p5-Authen-CyrusSASL/pkg-descr | 5 | ||||
-rw-r--r-- | security/p5-Authen-CyrusSASL/pkg-plist | 8 |
5 files changed, 91 insertions, 0 deletions
diff --git a/security/p5-Authen-CyrusSASL/Makefile b/security/p5-Authen-CyrusSASL/Makefile new file mode 100644 index 000000000000..7dc9fbce8d35 --- /dev/null +++ b/security/p5-Authen-CyrusSASL/Makefile @@ -0,0 +1,27 @@ +# New ports collection makefile for: p5-Authen-CyrusSASL +# Date created: October 05 2005 +# Whom: Attila Nagy <bra@fsn.hu> +# +# $FreeBSD$ +# + +PORTNAME= Authen-CyrusSASL +PORTVERSION= 0.01 +CATEGORIES= security perl5 +MASTER_SITES= ${MASTER_SITE_PERL_CPAN} +MASTER_SITE_SUBDIR= Authen +PKGNAMEPREFIX= p5- + +MAINTAINER= bra@fsn.hu +COMMENT= Perl5 module for accessing the SASL authentication daemon + +PERL_CONFIGURE= yes + +MAN3= Authen::CyrusSASL.3 + +post-patch: + @${MKDIR} ${WRKSRC}/lib + @${RM} ${WRKSRC}/Authen/*.orig + @${CP} -vpR ${WRKSRC}/Authen ${WRKSRC}/lib/ + +.include <bsd.port.mk> diff --git a/security/p5-Authen-CyrusSASL/distinfo b/security/p5-Authen-CyrusSASL/distinfo new file mode 100644 index 000000000000..9cb18da5e5ad --- /dev/null +++ b/security/p5-Authen-CyrusSASL/distinfo @@ -0,0 +1,2 @@ +MD5 (Authen-CyrusSASL-0.01.tar.gz) = 64f8d8c251cccb8bdf2e46d4ce7c2bf6 +SIZE (Authen-CyrusSASL-0.01.tar.gz) = 4113 diff --git a/security/p5-Authen-CyrusSASL/files/patch-CyrusSASL.pm b/security/p5-Authen-CyrusSASL/files/patch-CyrusSASL.pm new file mode 100644 index 000000000000..9c67c8bcd7ff --- /dev/null +++ b/security/p5-Authen-CyrusSASL/files/patch-CyrusSASL.pm @@ -0,0 +1,49 @@ +--- Authen/CyrusSASL.pm.orig Mon Sep 24 15:41:30 2001 ++++ Authen/CyrusSASL.pm Fri Aug 26 13:34:21 2005 +@@ -76,10 +76,13 @@ + } + + sub check_pwd { +- my ($self, $name, $pwd) = @_; ++ my ($self, $name, $pwd, $service, $realm) = @_; + my ($req, $res, $sh); + +- $req = "$name\0$pwd\0"; ++ $service = "imap" unless defined ($service); ++ $realm = "" unless defined ($realm); ++ ++ $req = sprintf ("\0%c%s\0%c%s\0%c%s\0%c%s", length $name, $name, length $pwd, $pwd, length $service, $service, length $realm, $realm); + $res = ' ' x 1024; + + # send request +@@ -93,7 +96,7 @@ + # sock->recv does not work + #$self->{'sock'}->recv ($res, 1024, 0) or return SASL_FAIL; + +- if (substr($res, 0, 2) ne 'OK') { ++ if (substr($res, 2, 2) ne 'OK') { + $! = substr($res, 3); + return SASL_BADAUTH; + } +@@ -113,10 +116,10 @@ + use Authen::CyrusSASL; + + $p = new Authen::CyrusSASL(Type => SASL_AUTHD, Dir => '/var/run/saslauthd'); +- print "check=", $r->check_pwd('username', 'userpass'), "\n"; ++ print "check=", $r->check_pwd('username', 'userpass', 'service', 'realm'), "\n"; + + $p = new Authen::CyrusSASL(Type => SASL_PWCHECK, Dir => '/var/run/pwcheck'); +- print "check=", $r->check_pwd('username', 'userpass'), "\n"; ++ print "check=", $r->check_pwd('username', 'userpass', 'service', 'realm'), "\n"; + + =head1 DESCRIPTION + +@@ -154,7 +157,7 @@ + + =over 4 + +-=item check_pwd ( USERNAME, PASSWORD ) ++=item check_pwd ( USERNAME, PASSWORD, SERVICE, REALM ) + + Checks with the SASL server if the specified C<PASSWORD> is valid for user + C<USERNAME>. It returns SASL_OK if the C<PASSWORD> is correct, diff --git a/security/p5-Authen-CyrusSASL/pkg-descr b/security/p5-Authen-CyrusSASL/pkg-descr new file mode 100644 index 000000000000..e22fac147248 --- /dev/null +++ b/security/p5-Authen-CyrusSASL/pkg-descr @@ -0,0 +1,5 @@ +The Authen::CyrusSASL module provides a simple class that allows you +to send request to the cyrus-sasl's authen daemon. +This module is based on the Authen::Radius module with the similar interface. + +WWW: http://search.cpan.org/dist/Authen-CyrusSASL/ diff --git a/security/p5-Authen-CyrusSASL/pkg-plist b/security/p5-Authen-CyrusSASL/pkg-plist new file mode 100644 index 000000000000..a6cdc1e368b7 --- /dev/null +++ b/security/p5-Authen-CyrusSASL/pkg-plist @@ -0,0 +1,8 @@ +%%SITE_PERL%%/Authen/CyrusSASL.pm +%%SITE_PERL%%/%%PERL_ARCH%%/auto/Authen/CyrusSASL/.packlist +%%SITE_PERL%%/auto/Authen/CyrusSASL/autosplit.ix +@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Authen/CyrusSASL +@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/Authen 2>/dev/null || true +@dirrm %%SITE_PERL%%/auto/Authen/CyrusSASL +@unexec rmdir %D/%%SITE_PERL%%/auto/Authen 2>/dev/null || true +@unexec rmdir %D/%%SITE_PERL%%/Authen 2>/dev/null || true |