Add py-kerberos 1.2.4
This Python package is a high-level wrapper for Kerberos (GSSAPI) operations. The goal is to avoid having to build a module that wraps the entire Kerberos.framework, and instead offer a limited set of functions that do what is needed for client/server Kerberos authentication based on RFC 4559.
This commit is contained in:
parent
f82187b0e6
commit
7878798f48
9 changed files with 164 additions and 0 deletions
5
security/py-kerberos/DESCR
Normal file
5
security/py-kerberos/DESCR
Normal file
|
@ -0,0 +1,5 @@
|
|||
This Python package is a high-level wrapper for Kerberos (GSSAPI)
|
||||
operations. The goal is to avoid having to build a module that
|
||||
wraps the entire Kerberos.framework, and instead offer a limited
|
||||
set of functions that do what is needed for client/server Kerberos
|
||||
authentication based on RFC 4559.
|
15
security/py-kerberos/Makefile
Normal file
15
security/py-kerberos/Makefile
Normal file
|
@ -0,0 +1,15 @@
|
|||
# $NetBSD: Makefile,v 1.1 2016/06/09 02:06:18 markd Exp $
|
||||
|
||||
DISTNAME= kerberos-1.2.4
|
||||
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= ${MASTER_SITE_PYPI:=k/kerberos/}
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= https://svn.calendarserver.org/wiki/PyKerberos
|
||||
COMMENT= Python Kerberos implementation
|
||||
LICENSE= apache-2.0
|
||||
|
||||
.include "../../lang/python/egg.mk"
|
||||
.include "../../mk/krb5.buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
6
security/py-kerberos/PLIST
Normal file
6
security/py-kerberos/PLIST
Normal file
|
@ -0,0 +1,6 @@
|
|||
@comment $NetBSD: PLIST,v 1.1 2016/06/09 02:06:18 markd Exp $
|
||||
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
|
||||
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
|
||||
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
|
||||
${PYSITELIB}/${EGG_INFODIR}/top_level.txt
|
||||
${PYSITELIB}/kerberos.so
|
11
security/py-kerberos/distinfo
Normal file
11
security/py-kerberos/distinfo
Normal file
|
@ -0,0 +1,11 @@
|
|||
$NetBSD: distinfo,v 1.1 2016/06/09 02:06:18 markd Exp $
|
||||
|
||||
SHA1 (kerberos-1.2.4.tar.gz) = f9fcffd23b6082d71c2a073193ec5bb7547db25b
|
||||
RMD160 (kerberos-1.2.4.tar.gz) = e87105b0bc447fb06f6d81b5aab063326147345f
|
||||
SHA512 (kerberos-1.2.4.tar.gz) = 5e1e7b3b9e421d15c18b67c09127de957ac193315c8e2e5d417c0f9fb4ba0fe5ff2f7654bd675ffd87e3d2f588788041083f130a13c8f6112a23d778a3903b62
|
||||
Size (kerberos-1.2.4.tar.gz) = 19615 bytes
|
||||
SHA1 (patch-setup.py) = a9dbfbba526c9c82f2c3180e3469fc5040362ffe
|
||||
SHA1 (patch-src_kerberosbasic.h) = 7afb1da96ef6ecfcfa619ad8e6235e81d1cf87e9
|
||||
SHA1 (patch-src_kerberosgss.c) = 8207233909e0342da5f9440184621ac1f5b7476d
|
||||
SHA1 (patch-src_kerberosgss.h) = e142a4bfc60e7cf0b944f1df461c806b14dbfb15
|
||||
SHA1 (patch-src_kerberospw.h) = fc856dc69a0fd9b0bcba4fd29dacf731de3be308
|
15
security/py-kerberos/patches/patch-setup.py
Normal file
15
security/py-kerberos/patches/patch-setup.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-setup.py,v 1.1 2016/06/09 02:06:18 markd Exp $
|
||||
|
||||
Support heimdal
|
||||
|
||||
--- setup.py.orig 2016-01-25 17:55:44.000000000 +0000
|
||||
+++ setup.py
|
||||
@@ -80,6 +80,8 @@ extra_link_args = getoutput("krb5-config
|
||||
|
||||
extra_compile_args = getoutput("krb5-config --cflags gssapi").split()
|
||||
|
||||
+if getoutput("krb5-config --version").find("heimdal") != -1:
|
||||
+ extra_compile_args.append("-DHEIMDAL")
|
||||
|
||||
#
|
||||
# Set up Extension modules that need to be built
|
22
security/py-kerberos/patches/patch-src_kerberosbasic.h
Normal file
22
security/py-kerberos/patches/patch-src_kerberosbasic.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-src_kerberosbasic.h,v 1.1 2016/06/09 02:06:18 markd Exp $
|
||||
|
||||
Support heimdal
|
||||
|
||||
--- src/kerberosbasic.h.orig 2016-01-25 17:51:33.000000000 +0000
|
||||
+++ src/kerberosbasic.h
|
||||
@@ -14,9 +14,15 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
+#ifdef HEIMDAL
|
||||
+#include <gssapi/gssapi.h>
|
||||
+#include <gssapi/gssapi_krb5.h>
|
||||
+#include <krb5.h>
|
||||
+#else
|
||||
#include <gssapi/gssapi.h>
|
||||
#include <gssapi/gssapi_generic.h>
|
||||
#include <gssapi/gssapi_krb5.h>
|
||||
+#endif
|
||||
|
||||
#define krb5_get_err_text(context,code) error_message(code)
|
||||
|
45
security/py-kerberos/patches/patch-src_kerberosgss.c
Normal file
45
security/py-kerberos/patches/patch-src_kerberosgss.c
Normal file
|
@ -0,0 +1,45 @@
|
|||
$NetBSD: patch-src_kerberosgss.c,v 1.1 2016/06/09 02:06:18 markd Exp $
|
||||
|
||||
Support heimdal
|
||||
|
||||
--- src/kerberosgss.c.orig 2016-01-25 17:51:33.000000000 +0000
|
||||
+++ src/kerberosgss.c
|
||||
@@ -43,7 +43,7 @@ char* server_principal_details(const cha
|
||||
int code;
|
||||
krb5_context kcontext;
|
||||
krb5_keytab kt = NULL;
|
||||
- krb5_kt_cursor cursor = NULL;
|
||||
+ krb5_kt_cursor cursor;
|
||||
krb5_keytab_entry entry;
|
||||
char* pname = NULL;
|
||||
|
||||
@@ -67,7 +67,7 @@ char* server_principal_details(const cha
|
||||
KrbException_class,
|
||||
Py_BuildValue("((s:i))", "Cannot get default keytab", code)
|
||||
);
|
||||
- goto end;
|
||||
+ goto end1;
|
||||
}
|
||||
|
||||
if ((code = krb5_kt_start_seq_get(kcontext, kt, &cursor))) {
|
||||
@@ -77,7 +77,7 @@ char* server_principal_details(const cha
|
||||
"((s:i))", "Cannot get sequence cursor from keytab", code
|
||||
)
|
||||
);
|
||||
- goto end;
|
||||
+ goto end1;
|
||||
}
|
||||
|
||||
while ((code = krb5_kt_next_entry(kcontext, kt, &entry, &cursor)) == 0) {
|
||||
@@ -115,9 +115,8 @@ char* server_principal_details(const cha
|
||||
}
|
||||
|
||||
end:
|
||||
- if (cursor) {
|
||||
- krb5_kt_end_seq_get(kcontext, kt, &cursor);
|
||||
- }
|
||||
+ krb5_kt_end_seq_get(kcontext, kt, &cursor);
|
||||
+end1:
|
||||
if (kt) {
|
||||
krb5_kt_close(kcontext, kt);
|
||||
}
|
23
security/py-kerberos/patches/patch-src_kerberosgss.h
Normal file
23
security/py-kerberos/patches/patch-src_kerberosgss.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
$NetBSD: patch-src_kerberosgss.h,v 1.1 2016/06/09 02:06:18 markd Exp $
|
||||
|
||||
Support heimdal
|
||||
|
||||
--- src/kerberosgss.h.orig 2016-01-25 17:51:33.000000000 +0000
|
||||
+++ src/kerberosgss.h
|
||||
@@ -14,9 +14,16 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
+#ifdef HEIMDAL
|
||||
+#include <gssapi/gssapi.h>
|
||||
+#include <gssapi/gssapi_krb5.h>
|
||||
+#include <krb5.h>
|
||||
+#define gss_krb5_nt_service_name GSS_KRB5_NT_PRINCIPAL_NAME
|
||||
+#else
|
||||
#include <gssapi/gssapi.h>
|
||||
#include <gssapi/gssapi_generic.h>
|
||||
#include <gssapi/gssapi_krb5.h>
|
||||
+#endif
|
||||
|
||||
#define krb5_get_err_text(context,code) error_message(code)
|
||||
|
22
security/py-kerberos/patches/patch-src_kerberospw.h
Normal file
22
security/py-kerberos/patches/patch-src_kerberospw.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-src_kerberospw.h,v 1.1 2016/06/09 02:06:18 markd Exp $
|
||||
|
||||
Support heimdal
|
||||
|
||||
--- src/kerberospw.h.orig 2015-03-26 21:53:18.000000000 +0000
|
||||
+++ src/kerberospw.h
|
||||
@@ -15,9 +15,15 @@
|
||||
*
|
||||
**/
|
||||
|
||||
+#ifdef HEIMDAL
|
||||
+#include <gssapi/gssapi.h>
|
||||
+#include <gssapi/gssapi_krb5.h>
|
||||
+#include <krb5.h>
|
||||
+#else
|
||||
#include <gssapi/gssapi.h>
|
||||
#include <gssapi/gssapi_generic.h>
|
||||
#include <gssapi/gssapi_krb5.h>
|
||||
+#endif
|
||||
|
||||
#define krb5_get_err_text(context,code) error_message(code)
|
||||
|
Loading…
Reference in a new issue