From 5398791b6e4d10810c83b9942aa64a6ce637a172 Mon Sep 17 00:00:00 2001 From: sthen Date: Mon, 8 Sep 2014 16:12:11 +0000 Subject: [PATCH] update to conserver 8.1.20, add more notes for upgrading users on how to unbreak things following the uid change --- comms/conserver/Makefile | 5 ++--- comms/conserver/distinfo | 4 ++-- .../patches/patch-conserver_Makefile_in | 14 ++++++------ .../patches/patch-conserver_cf_Makefile_in | 20 ++++++++--------- .../patches/patch-conserver_consent_c | 14 ++++++------ .../conserver/patches/patch-conserver_cutil_c | 22 +++++++++---------- .../conserver/patches/patch-conserver_group_c | 22 ++++--------------- .../conserver/patches/patch-console_console_c | 8 +++---- comms/conserver/pkg/README | 10 +++++++-- 9 files changed, 55 insertions(+), 64 deletions(-) diff --git a/comms/conserver/Makefile b/comms/conserver/Makefile index 61224ef5cb9..8cdd260b58a 100644 --- a/comms/conserver/Makefile +++ b/comms/conserver/Makefile @@ -1,9 +1,8 @@ -# $OpenBSD: Makefile,v 1.45 2014/08/21 19:58:07 sthen Exp $ +# $OpenBSD: Makefile,v 1.46 2014/09/08 16:12:11 sthen Exp $ COMMENT= manage remote serial consoles via TCP/IP -DISTNAME= conserver-8.1.16 -REVISION= 9 +DISTNAME= conserver-8.1.20 CATEGORIES= comms MAINTAINER= Stuart Henderson diff --git a/comms/conserver/distinfo b/comms/conserver/distinfo index 5b7b0c5b8c9..c7e6a424f12 100644 --- a/comms/conserver/distinfo +++ b/comms/conserver/distinfo @@ -1,2 +1,2 @@ -SHA256 (conserver-8.1.16.tar.gz) = Q9ydgbwj12oOwBrNH1T1wna3Ff7rj1K7M7XIHzJaRtg= -SIZE (conserver-8.1.16.tar.gz) = 311373 +SHA256 (conserver-8.1.20.tar.gz) = YaEHJ0hGmwWktmqilxn4GsHLgdtqj6llIWAolWjeisw= +SIZE (conserver-8.1.20.tar.gz) = 334147 diff --git a/comms/conserver/patches/patch-conserver_Makefile_in b/comms/conserver/patches/patch-conserver_Makefile_in index 9e3761d3b1b..70dcd28898a 100644 --- a/comms/conserver/patches/patch-conserver_Makefile_in +++ b/comms/conserver/patches/patch-conserver_Makefile_in @@ -1,7 +1,7 @@ -$OpenBSD: patch-conserver_Makefile_in,v 1.3 2008/06/21 11:29:25 sthen Exp $ ---- conserver/Makefile.in.orig Mon Jun 6 16:03:06 2005 -+++ conserver/Makefile.in Fri Oct 12 12:11:24 2007 -@@ -36,7 +36,7 @@ CONSERVER_HDRS = ../config.h $(top_srcdir)/compat.h $( +$OpenBSD: patch-conserver_Makefile_in,v 1.4 2014/09/08 16:12:11 sthen Exp $ +--- conserver/Makefile.in.orig Fri Sep 13 23:46:53 2013 ++++ conserver/Makefile.in Tue Sep 2 20:29:22 2014 +@@ -37,7 +37,7 @@ CONSERVER_HDRS = ../config.h $(top_srcdir)/compat.h $( $(srcdir)/group.h $(srcdir)/main.h $(srcdir)/master.h \ $(srcdir)/readcfg.h $(srcdir)/version.h @@ -10,7 +10,7 @@ $OpenBSD: patch-conserver_Makefile_in,v 1.3 2008/06/21 11:29:25 sthen Exp $ all: $(ALL) -@@ -46,8 +46,8 @@ $(CONSERVER_OBJS): $(CONSERVER_HDRS) +@@ -47,8 +47,8 @@ $(CONSERVER_OBJS): $(CONSERVER_HDRS) conserver: $(CONSERVER_OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o conserver $(CONSERVER_OBJS) $(LIBS) @@ -21,14 +21,14 @@ $OpenBSD: patch-conserver_Makefile_in,v 1.3 2008/06/21 11:29:25 sthen Exp $ .c.o: $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< -@@ -59,13 +59,9 @@ distclean: clean +@@ -60,13 +60,9 @@ distclean: clean rm -f Makefile conserver.rc install: conserver - $(MKDIR) $(DESTDIR)$(sbindir) - $(INSTALL_PROGRAM) conserver $(DESTDIR)$(sbindir) - $(MKDIR) $(DESTDIR)$(mandir)/man8 -- $(INSTALL) conserver.man $(DESTDIR)$(mandir)/man8/conserver.8 +- $(INSTALL) -m 0644 conserver.man $(DESTDIR)$(mandir)/man8/conserver.8 - $(MKDIR) $(DESTDIR)$(exampledir) - $(INSTALL) conserver.rc $(DESTDIR)$(exampledir) - $(MKDIR) $(DESTDIR)$(pkglibdir) diff --git a/comms/conserver/patches/patch-conserver_cf_Makefile_in b/comms/conserver/patches/patch-conserver_cf_Makefile_in index b5a1c52b268..8be049b7309 100644 --- a/comms/conserver/patches/patch-conserver_cf_Makefile_in +++ b/comms/conserver/patches/patch-conserver_cf_Makefile_in @@ -1,20 +1,20 @@ -$OpenBSD: patch-conserver_cf_Makefile_in,v 1.2 2005/08/02 07:25:47 pvalchev Exp $ ---- conserver.cf/Makefile.in.orig Tue Feb 10 01:32:28 2004 -+++ conserver.cf/Makefile.in Sat Jul 30 09:42:34 2005 -@@ -23,11 +23,10 @@ distclean: clean +$OpenBSD: patch-conserver_cf_Makefile_in,v 1.3 2014/09/08 16:12:11 sthen Exp $ +--- conserver.cf/Makefile.in.orig Fri Sep 13 23:46:51 2013 ++++ conserver.cf/Makefile.in Tue Sep 2 20:25:45 2014 +@@ -24,11 +24,10 @@ distclean: clean rm -f Makefile install: - $(MKDIR) $(DESTDIR)$(mandir)/man5 -- $(INSTALL) conserver.cf.man $(DESTDIR)$(mandir)/man5/conserver.cf.5 -- $(INSTALL) conserver.passwd.man $(DESTDIR)$(mandir)/man5/conserver.passwd.5 +- $(INSTALL) -m 0644 conserver.cf.man $(DESTDIR)$(mandir)/man5/conserver.cf.5 +- $(INSTALL) -m 0644 conserver.passwd.man $(DESTDIR)$(mandir)/man5/conserver.passwd.5 - $(MKDIR) $(DESTDIR)$(exampledir) - $(INSTALL) -m 0644 conserver.cf $(DESTDIR)$(exampledir) - $(INSTALL) -m 0644 conserver.passwd $(DESTDIR)$(exampledir) -+ $(BSD_INSTALL_MAN) conserver.cf.man $(DESTDIR)$(mandir)/man5/conserver.cf.5 -+ $(BSD_INSTALL_MAN) conserver.passwd.man $(DESTDIR)$(mandir)/man5/conserver.passwd.5 ++ $(BSD_INSTALL_MAN) -m 0644 conserver.cf.man $(DESTDIR)$(mandir)/man5/conserver.cf.5 ++ $(BSD_INSTALL_MAN) -m 0644 conserver.passwd.man $(DESTDIR)$(mandir)/man5/conserver.passwd.5 + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(exampledir) -+ $(BSD_INSTALL_DATA) conserver.cf $(DESTDIR)$(exampledir) -+ $(BSD_INSTALL_DATA) conserver.passwd $(DESTDIR)$(exampledir) ++ $(BSD_INSTALL_DATA) -m 0644 conserver.cf $(DESTDIR)$(exampledir) ++ $(BSD_INSTALL_DATA) -m 0644 conserver.passwd $(DESTDIR)$(exampledir) .PHONY: clean distclean install diff --git a/comms/conserver/patches/patch-conserver_consent_c b/comms/conserver/patches/patch-conserver_consent_c index 89a63ea5cdd..42b62a7cc7f 100644 --- a/comms/conserver/patches/patch-conserver_consent_c +++ b/comms/conserver/patches/patch-conserver_consent_c @@ -1,9 +1,9 @@ -$OpenBSD: patch-conserver_consent_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ ---- conserver/consent.c.orig Mon Apr 9 16:52:28 2007 -+++ conserver/consent.c Fri Oct 12 11:29:17 2007 -@@ -587,7 +587,8 @@ VirtDev(pCE) - Error("[%s] tcgetattr(0): %s", pCE->server, strerror(errno)); - Bye(EX_OSERR); +$OpenBSD: patch-conserver_consent_c,v 1.4 2014/09/08 16:12:11 sthen Exp $ +--- conserver/consent.c.orig Fri Apr 4 06:34:13 2014 ++++ conserver/consent.c Tue Sep 2 20:24:00 2014 +@@ -557,7 +557,8 @@ SetupTty(pCE, fd) + if (0 != tcgetattr(1, &n_tio)) { + exit(EX_OSERR); } - n_tio.c_iflag &= ~(IGNCR | IUCLC); + @@ -11,7 +11,7 @@ $OpenBSD: patch-conserver_consent_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ n_tio.c_iflag |= ICRNL; if (pCE->ixon == FLAGTRUE) n_tio.c_iflag |= IXON; -@@ -595,10 +596,8 @@ VirtDev(pCE) +@@ -565,10 +566,8 @@ SetupTty(pCE, fd) n_tio.c_iflag |= IXANY; if (pCE->ixoff == FLAGTRUE) n_tio.c_iflag |= IXOFF; diff --git a/comms/conserver/patches/patch-conserver_cutil_c b/comms/conserver/patches/patch-conserver_cutil_c index 9e916f48bfc..ba8383442f3 100644 --- a/comms/conserver/patches/patch-conserver_cutil_c +++ b/comms/conserver/patches/patch-conserver_cutil_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-conserver_cutil_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ ---- conserver/cutil.c.orig Tue Dec 26 07:27:34 2006 -+++ conserver/cutil.c Fri Oct 12 11:45:03 2007 -@@ -2189,7 +2189,7 @@ ProbeInterfaces(bindAddr) +$OpenBSD: patch-conserver_cutil_c,v 1.4 2014/09/08 16:12:11 sthen Exp $ +--- conserver/cutil.c.orig Fri Apr 4 17:17:10 2014 ++++ conserver/cutil.c Tue Sep 2 20:27:36 2014 +@@ -2198,7 +2198,7 @@ ProbeInterfaces(bindAddr) { #ifdef SIOCGIFCONF struct ifconf ifc; @@ -10,7 +10,7 @@ $OpenBSD: patch-conserver_cutil_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ #ifdef SIOCGIFFLAGS struct ifreq ifrcopy; #endif -@@ -2258,7 +2258,7 @@ ProbeInterfaces(bindAddr) +@@ -2267,7 +2267,7 @@ ProbeInterfaces(bindAddr) * than loop through looking for valid interfaces that are up * twice, huh? */ @@ -19,23 +19,23 @@ $OpenBSD: patch-conserver_cutil_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ CONDDEBUG((1, "ProbeInterfaces(): ifc_len==%d max_count==%d", ifc.ifc_len, count)); -@@ -2277,17 +2277,18 @@ ProbeInterfaces(bindAddr) +@@ -2286,17 +2286,18 @@ ProbeInterfaces(bindAddr) for (m = r = 0; r < ifc.ifc_len;) { struct sockaddr *sa; - ifr = (struct ifreq *)&ifc.ifc_buf[r]; - sa = (struct sockaddr *)&ifr->ifr_addr; -+ + memcpy(&ifr, &ifc.ifc_buf[r], sizeof(ifr)); + sa = (struct sockaddr *)&ifr.ifr_addr; ++ /* don't use less than a ifreq sized chunk */ - if ((ifc.ifc_len - r) < sizeof(*ifr)) + if ((ifc.ifc_len - r) < sizeof(ifr)) break; #ifdef HAVE_SA_LEN -- if (sa->sa_len > sizeof(ifr->ifr_addr)) +- if (sa->sa_len > sizeof(ifr->ifr_ifru)) - r += sizeof(ifr->ifr_name) + sa->sa_len; -+ if (sa->sa_len > sizeof(ifr.ifr_addr)) ++ if (sa->sa_len > sizeof(ifr.ifr_ifru)) + r += sizeof(ifr.ifr_name) + sa->sa_len; else #endif @@ -44,7 +44,7 @@ $OpenBSD: patch-conserver_cutil_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ if (sa->sa_family == AF_INET) { struct sockaddr_in *sin = (struct sockaddr_in *)sa; -@@ -2308,14 +2309,14 @@ ProbeInterfaces(bindAddr) +@@ -2317,14 +2318,14 @@ ProbeInterfaces(bindAddr) #ifdef SIOCGIFFLAGS /* make sure the interface is up */ @@ -61,7 +61,7 @@ $OpenBSD: patch-conserver_cutil_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ #if HAVE_MEMCPY memcpy(&myAddrs[m], &(sin->sin_addr), sizeof(struct in_addr)); -@@ -2324,7 +2325,7 @@ ProbeInterfaces(bindAddr) +@@ -2333,7 +2334,7 @@ ProbeInterfaces(bindAddr) #endif Verbose("interface address %s (%s)", inet_ntoa(myAddrs[m]), diff --git a/comms/conserver/patches/patch-conserver_group_c b/comms/conserver/patches/patch-conserver_group_c index 3a939db59b6..d405826a6bd 100644 --- a/comms/conserver/patches/patch-conserver_group_c +++ b/comms/conserver/patches/patch-conserver_group_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-conserver_group_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ ---- conserver/group.c.orig Mon Apr 2 19:18:59 2007 -+++ conserver/group.c Fri Oct 12 12:03:25 2007 -@@ -2505,7 +2505,7 @@ TelOpt(o) +$OpenBSD: patch-conserver_group_c,v 1.4 2014/09/08 16:12:11 sthen Exp $ +--- conserver/group.c.orig Fri Apr 4 17:17:10 2014 ++++ conserver/group.c Tue Sep 2 20:24:00 2014 +@@ -2911,7 +2911,7 @@ TelOpt(o) if (o < sizeof(telopts) / sizeof(char *)) return telopts[o]; else { @@ -10,17 +10,3 @@ $OpenBSD: patch-conserver_group_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ return opt; } } -@@ -3839,11 +3839,9 @@ DoClientRead(pGE, pCLServing) - "failed]\r\n", -1); - continue; - } -- if (TAB3 == (TABDLY & sbuf.c_oflag)) { -- sbuf.c_oflag &= ~TABDLY; -- sbuf.c_oflag |= TAB0; -+ if (TAB3 & sbuf.c_oflag) { -+ sbuf.c_oflag &= ~TAB3; - } else { -- sbuf.c_oflag &= ~TABDLY; - sbuf.c_oflag |= TAB3; - } - if (-1 == diff --git a/comms/conserver/patches/patch-console_console_c b/comms/conserver/patches/patch-console_console_c index 2abf8f1762d..21148dd1d6b 100644 --- a/comms/conserver/patches/patch-console_console_c +++ b/comms/conserver/patches/patch-console_console_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-console_console_c,v 1.3 2008/06/21 11:29:25 sthen Exp $ ---- console/console.c.orig Thu Jun 15 04:01:05 2006 -+++ console/console.c Fri Oct 12 11:29:17 2007 -@@ -577,7 +577,7 @@ C2Raw() +$OpenBSD: patch-console_console_c,v 1.4 2014/09/08 16:12:11 sthen Exp $ +--- console/console.c.orig Wed Apr 2 01:02:47 2014 ++++ console/console.c Tue Sep 2 20:24:00 2014 +@@ -679,7 +679,7 @@ C2Raw() Bye(EX_UNAVAILABLE); } n_tios = o_tios; diff --git a/comms/conserver/pkg/README b/comms/conserver/pkg/README index 377ae029f61..4c2d86cec93 100644 --- a/comms/conserver/pkg/README +++ b/comms/conserver/pkg/README @@ -1,4 +1,4 @@ -$OpenBSD: README,v 1.3 2014/07/15 13:47:26 benno Exp $ +$OpenBSD: README,v 1.4 2014/09/08 16:12:11 sthen Exp $ +----------------------------------------------------------------------- | Running ${FULLPKGNAME} on OpenBSD @@ -11,6 +11,12 @@ to group dialer in /etc/group: dialer:*:117:_conserver This is not necessary if you only use it to log and control access to -terminal servers over the network. +terminal servers over the network rather than on local serial ports. + +If you have upgraded from a previous version of the OpenBSD package which +ran as root, you will need to change permissions/ownership on log files to +ensure that the _conserver user can write to them, e.g.: + + chown _conserver /var/log/conserver /var/log/consoles/* See more information at http://www.conserver.com/