aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authormnag <mnag@FreeBSD.org>2005-10-06 00:31:43 +0800
committermnag <mnag@FreeBSD.org>2005-10-06 00:31:43 +0800
commit214744a1a2063d8f709112f4020a916395c06bd8 (patch)
tree57183ad6005446e0cea071a5f0e635db9804d97a /security
parentbeadbab39f5cc385aa16a0f51c72ae7e22ed3ed3 (diff)
downloadfreebsd-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')
-rw-r--r--security/Makefile1
-rw-r--r--security/p5-Authen-CyrusSASL/Makefile27
-rw-r--r--security/p5-Authen-CyrusSASL/distinfo2
-rw-r--r--security/p5-Authen-CyrusSASL/files/patch-CyrusSASL.pm49
-rw-r--r--security/p5-Authen-CyrusSASL/pkg-descr5
-rw-r--r--security/p5-Authen-CyrusSASL/pkg-plist8
6 files changed, 92 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index a2cf2871c88e..04a8eaaa4f2a 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -259,6 +259,7 @@
SUBDIR += osiris
SUBDIR += outguess
SUBDIR += p5-Authen-Captcha
+ SUBDIR += p5-Authen-CyrusSASL
SUBDIR += p5-Authen-Krb5
SUBDIR += p5-Authen-PAM
SUBDIR += p5-Authen-Radius
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