Date: Wed, 4 Aug 2010 12:34:35 GMT From: Michael Pounov <misho@aitbg.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/149270: ipsec-tools is broken in CURRENT Message-ID: <201008041234.o74CYZRT014285@www.freebsd.org> Resent-Message-ID: <201008041240.o74Ce47c018478@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 149270 >Category: ports >Synopsis: ipsec-tools is broken in CURRENT >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Aug 04 12:40:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Michael Pounov >Release: FreeBSD 9.0-CURRENT >Organization: AITNET >Environment: FreeBSD smurf.insecurebg.org 9.0-CURRENT FreeBSD 9.0-CURRENT #5: Fri Jul 30 18:11:06 EEST 2010 root@smurf.insecurebg.org:/usr/obj/usr/src/sys/GENERIC.ALIEN i386 >Description: ipsec-tools is broken in current. This patch files fix Makefile of port dir and fix isakmp_cfg source file. Change login and logout functions and remove ut structure. >How-To-Repeat: cd /usr/ports/security/ipsec-tools; make install >Fix: patch < ipsec-tools_fbsd90.patch Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/security/ipsec-tools/Makefile,v retrieving revision 1.26 diff -u -r1.26 Makefile --- Makefile 20 Mar 2010 15:12:15 -0000 1.26 +++ Makefile 4 Aug 2010 11:18:17 -0000 @@ -60,7 +60,7 @@ .include <bsd.port.pre.mk> .if ${OSVERSION} > 900007 -BROKEN= fails to build with new utmpx +LDFLAGS+= -lulog .endif .ifdef(WITH_DEBUG) --- work/ipsec-tools-0.7.3/src/racoon/isakmp_cfg.c 2008-11-27 17:25:20.000000000 +0200 +++ work/ipsec-tools-0.7.3/src/racoon/isakmp_cfg_new.c 2010-08-04 14:58:27.000000000 +0300 @@ -38,7 +38,8 @@ #include <sys/socket.h> #include <sys/queue.h> -#include <utmp.h> +#include <utmpx.h> +#include <ulog.h> #if defined(__APPLE__) && defined(__MACH__) #include <util.h> #endif @@ -1651,8 +1652,7 @@ int inout; { int error = 0; - struct utmp ut; - char term[UT_LINESIZE]; + char term[8]; char addr[NI_MAXHOST]; if (usr == NULL || usr[0]=='\0') { @@ -1665,33 +1665,20 @@ switch (inout) { case ISAKMP_CFG_LOGIN: - strncpy(ut.ut_name, usr, UT_NAMESIZE); - ut.ut_name[UT_NAMESIZE - 1] = '\0'; - - strncpy(ut.ut_line, term, UT_LINESIZE); - ut.ut_line[UT_LINESIZE - 1] = '\0'; - GETNAMEINFO_NULL(raddr, addr); - strncpy(ut.ut_host, addr, UT_HOSTSIZE); - ut.ut_host[UT_HOSTSIZE - 1] = '\0'; - ut.ut_time = time(NULL); - plog(LLV_INFO, LOCATION, NULL, "Accounting : '%s' logging on '%s' from %s.\n", - ut.ut_name, ut.ut_line, ut.ut_host); - - login(&ut); + term, usr, addr); + ulog_login(term, usr, addr); break; case ISAKMP_CFG_LOGOUT: - plog(LLV_INFO, LOCATION, NULL, "Accounting : '%s' unlogging from '%s'.\n", usr, term); - logout(term); - + ulog_logout(term); break; default: plog(LLV_ERROR, LOCATION, NULL, "Unepected inout\n"); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008041234.o74CYZRT014285>