Date: Wed, 4 Aug 2010 16:10:28 +0300 From: Michael Pounov <misho@openbsd-bg.org> To: freebsd-ports@freebsd.org, freebsd-net@freebsd.org, freebsd-isp@freebsd.org Subject: ipsec-tools fix broken in CURRENT Message-ID: <20100804161028.b5bb28bd.misho@openbsd-bg.org>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --Multipart=_Wed__4_Aug_2010_16_10_28_+0300_e2yXFabKSTd1sgI= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi, this patch file ipsec-tools_fbsd90.txt Fix broken ipsec-tools in freebsd 9.0-current. Because after change syscons stop compiling sources. You can access the state of your problem report at any time via this link: http://www.freebsd.org/cgi/query-pr.cgi?pr=149270 >Category: ports >Responsible: freebsd-ports-bugs >Synopsis: ipsec-tools is broken in CURRENT >Arrival-Date: Wed Aug 04 12:40:04 UTC 2010 -- Michael Pounov <misho@openbsd-bg.org> --Multipart=_Wed__4_Aug_2010_16_10_28_+0300_e2yXFabKSTd1sgI= Content-Type: text/plain; name="ipsec-tools_fbsd90.txt" Content-Disposition: attachment; filename="ipsec-tools_fbsd90.txt" Content-Transfer-Encoding: 7bit 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"); --Multipart=_Wed__4_Aug_2010_16_10_28_+0300_e2yXFabKSTd1sgI=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100804161028.b5bb28bd.misho>