ports/129092: [PATCH] security/openssh-portable: Fix ldap timeout problem in 64-bit platform
Jui-Nan Lin
jnlin at csie.nctu.edu.tw
Sun Nov 23 16:40:06 UTC 2008
>Number: 129092
>Category: ports
>Synopsis: [PATCH] security/openssh-portable: Fix ldap timeout problem in 64-bit platform
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Nov 23 16:40:05 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Jui-Nan Lin
>Release: FreeBSD 7.0-RELEASE-p1 amd64
>Organization:
>Environment:
System: FreeBSD Florence.tamama.org 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #5: Mon May 5 00:36:32 CST
>Description:
Import http://code.google.com/p/openssh-lpk/source/browse/trunk/patch/contrib/contrib-openssh-5.1_p1-lpk-64bit.patch to FreeBSD ports system. It solved a problem in 64-bit platform that the bind timeout and search timeout values were not being parsed correctly: http://bugs.gentoo.org/210110
Added file(s):
- files/openssh-lpk-5.0p1-64bit.patch
Port maintainer (mnag at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- openssh-portable-5.0.p1_1,1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/security/openssh-portable/Makefile /home/users/jnlin/ports/openssh-portable/Makefile
--- /usr/ports/security/openssh-portable/Makefile 2008-11-11 21:03:40.000000000 +0800
+++ /home/users/jnlin/ports/openssh-portable/Makefile 2008-11-24 00:12:13.730346940 +0800
@@ -26,6 +26,7 @@
NO_CHECKSUM= yes
DISTNAME+= ${PORTNAME}-SNAP-${PORTREVISION}
.else
+PORTREVISION= 1
DISTNAME+= ${PORTNAME}-${DISTVERSION}
.endif
@@ -148,6 +149,9 @@
# See http://dev.inversepath.com/trac/openssh-lpk
.if defined(WITH_LPK)
EXTRA_PATCHES= ${FILESDIR}/openssh-lpk-5.0p1-0.3.9.patch
+.if ${ARCH} == "amd64"
+EXTRA_PATCHES+= ${FILESDIR}/openssh-lpk-5.0p1-64bit.patch
+.endif
USE_OPENLDAP= yes
CPPFLAGS+= "-I${LOCALBASE}/include -DWITH_LDAP_PUBKEY"
CONFIGURE_ARGS+= --with-libs='-lldap' --with-ldflags='-L${LOCALBASE}/lib' \
diff -ruN --exclude=CVS /usr/ports/security/openssh-portable/files/openssh-lpk-5.0p1-64bit.patch /home/users/jnlin/ports/openssh-portable/files/openssh-lpk-5.0p1-64bit.patch
--- /usr/ports/security/openssh-portable/files/openssh-lpk-5.0p1-64bit.patch 1970-01-01 08:00:00.000000000 +0800
+++ /home/users/jnlin/ports/openssh-portable/files/openssh-lpk-5.0p1-64bit.patch 2008-11-24 00:07:15.074737542 +0800
@@ -0,0 +1,44 @@
+diff -Nuar --exclude '*.rej' servconf.c.orig servconf.c
+--- servconf.c.orig 2008-08-23 15:02:47.000000000 -0700
++++ servconf.c 2008-08-23 15:04:21.000000000 -0700
+@@ -701,6 +701,7 @@
+ int cmdline = 0, *intptr, value, n;
+ SyslogFacility *log_facility_ptr;
+ LogLevel *log_level_ptr;
++ unsigned long lvalue, *longptr;
+ ServerOpCodes opcode;
+ u_short port;
+ u_int i, flags = 0;
+@@ -715,6 +716,7 @@
+ if (!arg || !*arg || *arg == '#')
+ return 0;
+ intptr = NULL;
++ longptr = NULL;
+ charptr = NULL;
+ opcode = parse_token(arg, filename, linenum, &flags);
+
+@@ -1449,11 +1451,20 @@
+ *intptr = value;
+ break;
+ case sBindTimeout:
+- intptr = (int *) &options->lpk.b_timeout.tv_sec;
+- goto parse_int;
++ longptr = (unsigned long *) &options->lpk.b_timeout.tv_sec;
++parse_ulong:
++ arg = strdelim(&cp);
++ if (!arg || *arg == '\0')
++ fatal("%s line %d: missing integer value.",
++ filename, linenum);
++ lvalue = atol(arg);
++ if (*activep && *longptr == -1)
++ *longptr = lvalue;
++ break;
++
+ case sSearchTimeout:
+- intptr = (int *) &options->lpk.s_timeout.tv_sec;
+- goto parse_int;
++ longptr = (unsigned long *) &options->lpk.s_timeout.tv_sec;
++ goto parse_ulong;
+ break;
+ case sLdapConf:
+ arg = cp;
--- openssh-portable-5.0.p1_1,1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list