Bug 176217 - [patch] comms/conserver-com to enable/fix GSSAPI
Summary: [patch] comms/conserver-com to enable/fix GSSAPI
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jun Kuriyama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-17 22:00 UTC by Ryan Steinmetz
Modified: 2018-10-10 18:45 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (6.37 KB, patch)
2013-02-17 22:00 UTC, Ryan Steinmetz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Steinmetz freebsd_committer freebsd_triage 2013-02-17 22:00:01 UTC
- Add GSSAPI-related options to enable/control GSSAPI functionality
- Bump PORTREVISION

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-02-17 22:00:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kuriyama

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Jun Kuriyama freebsd_committer freebsd_triage 2013-03-03 10:18:22 UTC
Hi,

Is this patch submitted to upstream?  It seems not related only
FreeBSD ports, then should this included in original sources?


-- 
Jun Kuriyama <kuriyama@FreeBSD.org> // FreeBSD Project
Comment 3 Ryan Steinmetz freebsd_committer freebsd_triage 2013-03-03 13:24:54 UTC
Jun,

Yes, the patches have been submitted upstream.  I also took the liberty
of submitting the other local patches that you have applied to the port
(patch-cutil.c, patch-conserver__group.c).

Since the port already has local patches to resolve various issues, we
should apply the additional fixes related to GSSAPI in the interim until
upstream commits the changes and releases a new version.  The last
release was in 2010, so I don't want to try waiting until they integrate
the GSSAPI fixes into a new version.

-r


On (03/03/13 19:18), Jun Kuriyama wrote:
>
>Hi,
>
>Is this patch submitted to upstream?  It seems not related only
>FreeBSD ports, then should this included in original sources?
>
>
>-- 
>Jun Kuriyama <kuriyama@FreeBSD.org> // FreeBSD Project

-- 
Ryan Steinmetz
PGP: EF36 D45A 5CA9 28B1 A550  18CD A43C D111 7AD7 FAF2
Comment 4 Ryan Steinmetz freebsd_committer freebsd_triage 2013-03-09 18:25:00 UTC
So, can we get these patches applied in the interim?
-r
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-03-23 21:28:20 UTC
Author: zi
Date: Sat Mar 23 21:28:12 2013
New Revision: 315081
URL: http://svnweb.freebsd.org/changeset/ports/315081

Log:
  - 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)

Added:
  head/comms/conserver-com/files/extra-patch-conserver__master.c   (contents, props changed)
  head/comms/conserver-com/files/patch-configure   (contents, props changed)
  head/comms/conserver-com/files/patch-conserver__group.c   (contents, props changed)
Deleted:
  head/comms/conserver-com/files/patch-group.c
Modified:
  head/comms/conserver-com/Makefile

Modified: head/comms/conserver-com/Makefile
==============================================================================
--- head/comms/conserver-com/Makefile	Sat Mar 23 20:45:01 2013	(r315080)
+++ head/comms/conserver-com/Makefile	Sat Mar 23 21:28:12 2013	(r315081)
@@ -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=${DEFAULTH
 		--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>

Added: head/comms/conserver-com/files/extra-patch-conserver__master.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/conserver-com/files/extra-patch-conserver__master.c	Sat Mar 23 21:28:12 2013	(r315081)
@@ -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

Added: head/comms/conserver-com/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/conserver-com/files/patch-configure	Sat Mar 23 21:28:12 2013	(r315081)
@@ -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

Added: head/comms/conserver-com/files/patch-conserver__group.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/conserver-com/files/patch-conserver__group.c	Sat Mar 23 21:28:12 2013	(r315081)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Ryan Steinmetz freebsd_committer freebsd_triage 2013-03-23 21:28:27 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 7 Ed Maste freebsd_committer freebsd_triage 2018-10-10 18:45:55 UTC
Conserver development has recently moved to github - perhaps time to have another go at upstreaming?

https://github.com/conserver/conserver