aboutsummaryrefslogtreecommitdiffstats
path: root/comms
diff options
context:
space:
mode:
authorzi <zi@FreeBSD.org>2013-03-24 05:28:12 +0800
committerzi <zi@FreeBSD.org>2013-03-24 05:28:12 +0800
commitd62f2104493d5c63e948c94c2af7895fd21fd73e (patch)
treefc44eff6213cd2bf0263d919d7c109af2eeeac0b /comms
parentbe9c1f13cda5269df9dbe9041c9b5db7841fec20 (diff)
downloadfreebsd-ports-gnome-d62f2104493d5c63e948c94c2af7895fd21fd73e.tar.gz
freebsd-ports-gnome-d62f2104493d5c63e948c94c2af7895fd21fd73e.tar.zst
freebsd-ports-gnome-d62f2104493d5c63e948c94c2af7895fd21fd73e.zip
- Add GSSAPI-related options to enable/control GSSAPI functionality
- Add missing include (bsd.port.options.mk) - Bump PORTREVISION PR: ports/176217 Submitted by: zi@ (me) Approved by: kuriyama@ (maintainer timeout, ~3weeks)
Diffstat (limited to 'comms')
-rw-r--r--comms/conserver-com/Makefile23
-rw-r--r--comms/conserver-com/files/extra-patch-conserver__master.c17
-rw-r--r--comms/conserver-com/files/patch-configure34
-rw-r--r--comms/conserver-com/files/patch-conserver__group.c44
-rw-r--r--comms/conserver-com/files/patch-group.c18
5 files changed, 114 insertions, 22 deletions
diff --git a/comms/conserver-com/Makefile b/comms/conserver-com/Makefile
index 08a594f6b249..916838130957 100644
--- a/comms/conserver-com/Makefile
+++ b/comms/conserver-com/Makefile
@@ -2,6 +2,7 @@
PORTNAME= conserver
PORTVERSION= 8.1.18
+PORTREVISION= 1
CATEGORIES= comms
MASTER_SITES= http://www.conserver.com/ \
ftp://ftp.conserver.com/conserver/
@@ -15,12 +16,16 @@ CONFIGURE_ARGS= --with-master=${DEFAULTHOST} --with-port=${DEFAULTPORT} \
--with-pam --with-libwrap --with-openssl
USE_RC_SUBR= conserver
-MAN1= console.1
-MAN5= conserver.cf.5 conserver.passwd.5
-MAN8= conserver.8
+MAN1= console.1
+MAN5= conserver.cf.5 conserver.passwd.5
+MAN8= conserver.8
-OPTIONS_DEFINE= UDS
+OPTIONS_DEFINE= UDS GSSAPI GSSAPIONLY STRIPREALM
UDS_DESC= Use Unix domain sockets for client/server
+STRIPREALM_DESC=Strip @REALM when using GSSAPI
+GSSAPIONLY_DESC=Never prompt for a password when using GSSAPI
+
+.include <bsd.port.options.mk>
DEFAULTPORT?= 782
DEFAULTHOST?= localhost
@@ -31,4 +36,14 @@ DEFAULTHOST?= localhost
CONFIGURE_ARGS+= --with-uds
.endif
+.if ${PORT_OPTIONS:MGSSAPI}
+CONFIGURE_ARGS+= --with-gssapi
+.if ${PORT_OPTIONS:MSTRIPREALM}
+CONFIGURE_ARGS+= --with-striprealm
+.endif
+.if ${PORT_OPTIONS:MGSSAPIONLY}
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-conserver__master.c
+.endif
+.endif
+
.include <bsd.port.post.mk>
diff --git a/comms/conserver-com/files/extra-patch-conserver__master.c b/comms/conserver-com/files/extra-patch-conserver__master.c
new file mode 100644
index 000000000000..eb5a8d67c1c0
--- /dev/null
+++ b/comms/conserver-com/files/extra-patch-conserver__master.c
@@ -0,0 +1,17 @@
+--- ./conserver/master.c.orig 2013-02-15 18:35:06.000000000 -0500
++++ ./conserver/master.c 2013-02-15 18:36:30.000000000 -0500
+@@ -571,9 +571,14 @@
+ FileWrite(pCLServing->fd, FLAGFALSE, "ok\r\n",
+ 4);
+ } else {
++#if HAVE_GSSAPI
++ FileWrite(pCLServing->fd, FLAGFALSE,
++ "kerberos/gssapi required, use kinit\r\n", -1);
++#else
+ FilePrint(pCLServing->fd, FLAGFALSE,
+ "passwd? %s\r\n", myHostname);
+ pCLServing->iState = S_PASSWD;
++#endif
+ }
+ }
+ #if HAVE_OPENSSL
diff --git a/comms/conserver-com/files/patch-configure b/comms/conserver-com/files/patch-configure
new file mode 100644
index 000000000000..b6ace457fc85
--- /dev/null
+++ b/comms/conserver-com/files/patch-configure
@@ -0,0 +1,34 @@
+--- ./configure.orig 2009-09-26 05:18:38.000000000 -0400
++++ ./configure 2013-02-15 18:55:19.000000000 -0500
+@@ -7287,6 +7287,7 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++#include <stdio.h>
+ #include <gssapi/gssapi.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+@@ -7328,6 +7329,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++#include <stdio.h>
+ #include <gssapi/gssapi.h>
+ _ACEOF
+ if { (ac_try="$ac_cpp conftest.$ac_ext"
+@@ -7405,6 +7407,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++#include <stdio.h>
+ #include <gssapi/gssapi.h>
+
+ int
+@@ -7513,6 +7516,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
++#include <stdio.h>
+ #include <gssapi/gssapi.h>
+
+ int
diff --git a/comms/conserver-com/files/patch-conserver__group.c b/comms/conserver-com/files/patch-conserver__group.c
new file mode 100644
index 000000000000..0ae15d6109f9
--- /dev/null
+++ b/comms/conserver-com/files/patch-conserver__group.c
@@ -0,0 +1,44 @@
+--- ./conserver/group.c.orig 2009-09-26 05:58:05.000000000 -0400
++++ ./conserver/group.c 2013-02-15 18:34:20.000000000 -0500
+@@ -72,6 +72,7 @@
+ #include <master.h>
+ #include <main.h>
+ #include <version.h>
++#include <stdio.h>
+
+ #if HAVE_PAM
+ #include <security/pam_appl.h>
+@@ -1930,7 +1931,7 @@
+ FileWrite(pCL->fd, FLAGFALSE, sendtok.value, sendtok.length);
+ FileSetQuoteIAC(pCL->fd, FLAGTRUE);
+ pCL->iState = S_NORMAL;
+- gss_release_buffer(NULL, &sendtok);
++ gss_release_buffer(&stmin, &sendtok);
+ BuildString((char *)0, pCL->username);
+ BuildString((char *)0, pCL->acid);
+ stmaj = gss_display_name(&stmin, user, &dbuf, NULL);
+@@ -1940,7 +1941,7 @@
+ BuildStringChar('@', pCL->acid);
+ BuildString(pCL->peername->string, pCL->acid);
+ gss_release_name(&stmin, &user);
+- gss_release_buffer(NULL, &dbuf);
++ gss_release_buffer(&stmin, &dbuf);
+ ret = 1;
+ break;
+ case GSS_S_CREDENTIALS_EXPIRED:
+@@ -3940,12 +3941,10 @@
+ "failed]\r\n", -1);
+ continue;
+ }
+- if (TAB3 == (TABDLY & sbuf.c_oflag)) {
+- sbuf.c_oflag &= ~TABDLY;
+- sbuf.c_oflag |= TAB0;
++ if (sbuf.c_oflag & OXTABS) {
++ sbuf.c_oflag &= ~OXTABS;
+ } else {
+- sbuf.c_oflag &= ~TABDLY;
+- sbuf.c_oflag |= TAB3;
++ sbuf.c_oflag |= OXTABS;
+ }
+ if (-1 ==
+ tcsetattr(FileFDNum
diff --git a/comms/conserver-com/files/patch-group.c b/comms/conserver-com/files/patch-group.c
deleted file mode 100644
index e98032d5dcc7..000000000000
--- a/comms/conserver-com/files/patch-group.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- conserver/group.c.orig 2008-07-03 08:06:56.000000000 +0900
-+++ conserver/group.c 2008-07-03 08:08:28.000000000 +0900
-@@ -3839,12 +3839,10 @@
- "failed]\r\n", -1);
- continue;
- }
-- if (TAB3 == (TABDLY & sbuf.c_oflag)) {
-- sbuf.c_oflag &= ~TABDLY;
-- sbuf.c_oflag |= TAB0;
-+ if (sbuf.c_oflag & OXTABS) {
-+ sbuf.c_oflag &= ~OXTABS;
- } else {
-- sbuf.c_oflag &= ~TABDLY;
-- sbuf.c_oflag |= TAB3;
-+ sbuf.c_oflag |= OXTABS;
- }
- if (-1 ==
- tcsetattr(FileFDNum