Update conserver to 8.1.16, which fixes some bugs, rolls in
pvalchev's strcpy->strlcpy diffs, and adds some new functionality (see http://www.conserver.com/CHANGES for more details). Our /etc/services now includes a definition for conserver, so no need to mention it in the package installation message. ok pvalchev (maintainer).
This commit is contained in:
parent
0dc0c1d96f
commit
29f3197b55
@ -1,9 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.30 2007/09/16 01:37:09 merdely Exp $
|
||||
# $OpenBSD: Makefile,v 1.31 2008/06/21 11:29:25 sthen Exp $
|
||||
|
||||
COMMENT= manage remote serial consoles via TCP/IP
|
||||
|
||||
DISTNAME= conserver-8.1.11
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
DISTNAME= conserver-8.1.16
|
||||
CATEGORIES= comms
|
||||
|
||||
MAINTAINER= Peter Valchev <pvalchev@openbsd.org>
|
||||
@ -28,6 +27,7 @@ CONFIGURE_ARGS= --with-64bit \
|
||||
REGRESS_TARGET= test
|
||||
|
||||
post-install:
|
||||
@${INSTALL_DATA} ${FILESDIR}/README.OpenBSD ${PREFIX}/share/examples/conserver
|
||||
@${INSTALL_DATA} ${FILESDIR}/README.OpenBSD \
|
||||
${PREFIX}/share/examples/conserver
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (conserver-8.1.11.tar.gz) = lCWc1x846Us/JHdo47xzHw==
|
||||
RMD160 (conserver-8.1.11.tar.gz) = OAOGw/SIeHvxMoCQcbMIvJoAyJ8=
|
||||
SHA1 (conserver-8.1.11.tar.gz) = 0w1Mhrdp1WcH9qv61HmSzFnxKNo=
|
||||
SHA256 (conserver-8.1.11.tar.gz) = dX4FFsuLOKGoO6VonqEfcGyiTzZRK9WNAeoGw9IIcuo=
|
||||
SIZE (conserver-8.1.11.tar.gz) = 299281
|
||||
MD5 (conserver-8.1.16.tar.gz) = I2S6VvUgGwdka9+u/t0zCw==
|
||||
RMD160 (conserver-8.1.16.tar.gz) = kYgy0h1G9/IM+cEIjAWBkAkzQ6A=
|
||||
SHA1 (conserver-8.1.16.tar.gz) = biqYWSeBLMjCU0Y9U5Edw3+zcRE=
|
||||
SHA256 (conserver-8.1.16.tar.gz) = Q9ydgbwj12oOwBrNH1T1wna3Ff7rj1K7M7XIHzJaRtg=
|
||||
SIZE (conserver-8.1.16.tar.gz) = 311373
|
||||
|
@ -2,7 +2,7 @@ Using conserver in an OpenBSD environment:
|
||||
|
||||
1. Customize the configuration for your needs, see /etc/conserver.cf
|
||||
|
||||
2. Edit /etc/rc.conf file:
|
||||
2. Edit /etc/rc.conf.local file:
|
||||
...
|
||||
conserver=YES
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-configure_in,v 1.2 2005/08/02 07:25:47 pvalchev Exp $
|
||||
--- configure.in.orig Thu Jun 23 23:10:15 2005
|
||||
+++ configure.in Thu Jun 23 23:10:59 2005
|
||||
@@ -326,7 +326,7 @@ if test "$ac_cv_sys_posix_termios" != "y
|
||||
AC_MSG_ERROR([POSIX termios interface required])
|
||||
fi
|
||||
|
||||
-AC_CHECK_HEADERS(unistd.h getopt.h sys/vlimit.h sys/resource.h ttyent.h sys/ttold.h sys/uio.h sys/ioctl_compat.h usersec.h sys/select.h stropts.h sys/audit.h shadow.h sys/time.h crypt.h sysexits.h types.h sys/sockio.h sys/param.h)
|
||||
+AC_CHECK_HEADERS(unistd.h getopt.h sys/vlimit.h sys/resource.h ttyent.h sys/ttold.h sys/uio.h sys/types.h sys/param.h sys/proc.h sys/ioctl_compat.h usersec.h sys/select.h stropts.h sys/audit.h shadow.h sys/time.h crypt.h sysexits.h types.h)
|
||||
dnl sys/proc.h needs sys/param.h on openbsd, apparently
|
||||
AC_CHECK_HEADERS(sys/proc.h, [], [],
|
||||
[#if HAVE_SYS_PARAM_H
|
@ -1,7 +1,27 @@
|
||||
$OpenBSD: patch-conserver_Makefile_in,v 1.2 2005/08/02 07:25:47 pvalchev Exp $
|
||||
--- conserver/Makefile.in.orig Tue Feb 10 01:32:28 2004
|
||||
+++ conserver/Makefile.in Sat Jul 30 11:57:23 2005
|
||||
@@ -57,11 +57,8 @@ distclean: clean
|
||||
$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 $(
|
||||
$(srcdir)/group.h $(srcdir)/main.h $(srcdir)/master.h \
|
||||
$(srcdir)/readcfg.h $(srcdir)/version.h
|
||||
|
||||
-ALL = conserver convert
|
||||
+ALL = conserver conserver-convert
|
||||
|
||||
|
||||
all: $(ALL)
|
||||
@@ -46,8 +46,8 @@ $(CONSERVER_OBJS): $(CONSERVER_HDRS)
|
||||
conserver: $(CONSERVER_OBJS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o conserver $(CONSERVER_OBJS) $(LIBS)
|
||||
|
||||
-convert: convert.o cutil.o
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -o convert convert.o cutil.o $(LIBS)
|
||||
+conserver-convert: convert.o cutil.o
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o conserver-convert convert.o cutil.o $(LIBS)
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
@@ -59,13 +59,9 @@ distclean: clean
|
||||
rm -f Makefile conserver.rc
|
||||
|
||||
install: conserver
|
||||
@ -11,8 +31,11 @@ $OpenBSD: patch-conserver_Makefile_in,v 1.2 2005/08/02 07:25:47 pvalchev Exp $
|
||||
- $(INSTALL) conserver.man $(DESTDIR)$(mandir)/man8/conserver.8
|
||||
- $(MKDIR) $(DESTDIR)$(exampledir)
|
||||
- $(INSTALL) conserver.rc $(DESTDIR)$(exampledir)
|
||||
- $(MKDIR) $(DESTDIR)$(pkglibdir)
|
||||
- $(INSTALL) convert $(DESTDIR)$(pkglibdir)/convert
|
||||
+ $(BSD_INSTALL_PROGRAM) conserver $(DESTDIR)$(sbindir)
|
||||
+ $(BSD_INSTALL_MAN) conserver.man $(DESTDIR)$(mandir)/man8/conserver.8
|
||||
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(exampledir)
|
||||
+ $(BSD_INSTALL_PROGRAM) conserver-convert $(DESTDIR)$(sbindir)
|
||||
|
||||
.PHONY: clean distclean install
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-conserver_consent_c,v 1.2 2005/08/02 07:25:47 pvalchev Exp $
|
||||
--- conserver/consent.c.orig Thu Jun 23 23:28:58 2005
|
||||
+++ conserver/consent.c Thu Jun 23 23:30:52 2005
|
||||
@@ -528,7 +528,8 @@ VirtDev(pCE)
|
||||
$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);
|
||||
}
|
||||
@ -11,7 +11,7 @@ $OpenBSD: patch-conserver_consent_c,v 1.2 2005/08/02 07:25:47 pvalchev Exp $
|
||||
n_tio.c_iflag |= ICRNL;
|
||||
if (pCE->ixon == FLAGTRUE)
|
||||
n_tio.c_iflag |= IXON;
|
||||
@@ -536,10 +537,8 @@ VirtDev(pCE)
|
||||
@@ -595,10 +596,8 @@ VirtDev(pCE)
|
||||
n_tio.c_iflag |= IXANY;
|
||||
if (pCE->ixoff == FLAGTRUE)
|
||||
n_tio.c_iflag |= IXOFF;
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-conserver_convert_c,v 1.1 2005/08/02 07:25:48 pvalchev Exp $
|
||||
--- conserver/convert.c.orig Thu May 27 19:08:28 2004
|
||||
+++ conserver/convert.c Tue Aug 2 01:22:59 2005
|
||||
@@ -86,7 +86,7 @@ ReadLine2(fp, save, iLine)
|
||||
|| peek) {
|
||||
/* If we have a previously saved line, use it instead */
|
||||
if (save->used) {
|
||||
- strcpy(buf, save->string);
|
||||
+ strlcpy(buf, save->string, sizeof(buf));
|
||||
BuildString((char *)0, save);
|
||||
}
|
||||
|
@ -1,25 +1,7 @@
|
||||
$OpenBSD: patch-conserver_cutil_c,v 1.2 2007/06/15 11:53:39 sturm Exp $
|
||||
--- conserver/cutil.c.orig Tue Nov 9 09:37:05 2004
|
||||
+++ conserver/cutil.c Thu May 31 14:11:55 2007
|
||||
@@ -84,7 +84,7 @@ StrTime(ltime)
|
||||
time_t tyme;
|
||||
|
||||
tyme = time((time_t *)0);
|
||||
- strcpy(curtime, ctime(&tyme));
|
||||
+ strlcpy(curtime, ctime(&tyme), sizeof(curtime));
|
||||
curtime[24] = '\000'; /* might need to adjust this at some point */
|
||||
if (ltime != NULL)
|
||||
*ltime = tyme;
|
||||
@@ -424,7 +424,7 @@ ReadLine(fp, save, iLine)
|
||||
|| peek) {
|
||||
/* If we have a previously saved line, use it instead */
|
||||
if (save->used) {
|
||||
- strcpy(buf, save->string);
|
||||
+ strlcpy(buf, save->string, sizeof(buf));
|
||||
BuildString((char *)0, save);
|
||||
}
|
||||
|
||||
@@ -2138,7 +2138,7 @@ ProbeInterfaces(bindAddr)
|
||||
$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)
|
||||
{
|
||||
#ifdef SIOCGIFCONF
|
||||
struct ifconf ifc;
|
||||
@ -28,7 +10,7 @@ $OpenBSD: patch-conserver_cutil_c,v 1.2 2007/06/15 11:53:39 sturm Exp $
|
||||
#ifdef SIOCGIFFLAGS
|
||||
struct ifreq ifrcopy;
|
||||
#endif
|
||||
@@ -2198,7 +2198,7 @@ ProbeInterfaces(bindAddr)
|
||||
@@ -2258,7 +2258,7 @@ ProbeInterfaces(bindAddr)
|
||||
* than loop through looking for valid interfaces that are up
|
||||
* twice, huh?
|
||||
*/
|
||||
@ -37,7 +19,7 @@ $OpenBSD: patch-conserver_cutil_c,v 1.2 2007/06/15 11:53:39 sturm Exp $
|
||||
CONDDEBUG((1, "ProbeInterfaces(): ifc_len==%d max_count==%d",
|
||||
ifc.ifc_len, count));
|
||||
|
||||
@@ -2217,36 +2217,37 @@ ProbeInterfaces(bindAddr)
|
||||
@@ -2277,17 +2277,18 @@ ProbeInterfaces(bindAddr)
|
||||
|
||||
for (m = r = 0; r < ifc.ifc_len;) {
|
||||
struct sockaddr *sa;
|
||||
@ -62,6 +44,8 @@ $OpenBSD: patch-conserver_cutil_c,v 1.2 2007/06/15 11:53:39 sturm Exp $
|
||||
|
||||
if (sa->sa_family == AF_INET) {
|
||||
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
|
||||
@@ -2308,14 +2309,14 @@ ProbeInterfaces(bindAddr)
|
||||
|
||||
#ifdef SIOCGIFFLAGS
|
||||
/* make sure the interface is up */
|
||||
- ifrcopy = *ifr;
|
||||
@ -70,14 +54,16 @@ $OpenBSD: patch-conserver_cutil_c,v 1.2 2007/06/15 11:53:39 sturm Exp $
|
||||
((ifrcopy.ifr_flags & IFF_UP) == 0))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
CONDDEBUG((1, "ProbeInterfaces(): name=%s addr=%s",
|
||||
- ifr->ifr_name, inet_ntoa(sin->sin_addr)));
|
||||
+ ifr.ifr_name, inet_ntoa(sin->sin_addr)));
|
||||
|
||||
#if HAVE_MEMCPY
|
||||
memcpy(&myAddrs[m], &(sin->sin_addr), sizeof(struct in_addr));
|
||||
#else
|
||||
bcopy(&(sin->sin_addr), &myAddrs[m], sizeof(struct in_addr));
|
||||
@@ -2324,7 +2325,7 @@ ProbeInterfaces(bindAddr)
|
||||
#endif
|
||||
|
||||
Verbose("interface address %s (%s)", inet_ntoa(myAddrs[m]),
|
||||
- ifr->ifr_name);
|
||||
+ ifr.ifr_name);
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-conserver_group_c,v 1.2 2005/08/02 07:25:48 pvalchev Exp $
|
||||
--- conserver/group.c.orig Mon Oct 25 01:25:35 2004
|
||||
+++ conserver/group.c Tue Aug 2 01:20:46 2005
|
||||
@@ -2409,7 +2409,7 @@ TelOpt(o)
|
||||
$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)
|
||||
if (o < sizeof(telopts) / sizeof(char *))
|
||||
return telopts[o];
|
||||
else {
|
||||
@ -10,39 +10,17 @@ $OpenBSD: patch-conserver_group_c,v 1.2 2005/08/02 07:25:48 pvalchev Exp $
|
||||
return opt;
|
||||
}
|
||||
}
|
||||
@@ -3675,13 +3675,12 @@ DoClientRead(pGE, pCLServing)
|
||||
@@ -3839,11 +3839,9 @@ DoClientRead(pGE, pCLServing)
|
||||
"failed]\r\n", -1);
|
||||
continue;
|
||||
}
|
||||
# if !defined(XTABS) /* XXX hack */
|
||||
-# define XTABS TAB3
|
||||
+# define XTABS OXTAB3
|
||||
# endif
|
||||
- if (XTABS == (TABDLY & sbuf.c_oflag)) {
|
||||
- if (TAB3 == (TABDLY & sbuf.c_oflag)) {
|
||||
- sbuf.c_oflag &= ~TABDLY;
|
||||
- sbuf.c_oflag |= TAB0;
|
||||
+ if (XTABS & sbuf.c_oflag) {
|
||||
+ sbuf.c_oflag &= ~XTABS;
|
||||
+
|
||||
+ if (TAB3 & sbuf.c_oflag) {
|
||||
+ sbuf.c_oflag &= ~TAB3;
|
||||
} else {
|
||||
- sbuf.c_oflag &= ~TABDLY;
|
||||
sbuf.c_oflag |= XTABS;
|
||||
sbuf.c_oflag |= TAB3;
|
||||
}
|
||||
if (-1 ==
|
||||
@@ -4571,7 +4570,7 @@ Kiddie(pGE, sfd)
|
||||
BuildString("<unknown>@", pCL->acid);
|
||||
BuildString((char *)0, pCL->username);
|
||||
BuildString("<unknown>", pCL->username);
|
||||
- strcpy(pCL->actym, StrTime(&(pCL->tym)));
|
||||
+ strlcpy(pCL->actym, StrTime(&(pCL->tym)), sizeof(pCL->actym));
|
||||
pCL->typetym = pCL->tym;
|
||||
|
||||
/* link into the control list for the dummy console
|
||||
@@ -4681,7 +4680,7 @@ Spawn(pGE)
|
||||
Error("Spawn(): path to socket too long: %s", portPath->string);
|
||||
Bye(EX_OSERR);
|
||||
}
|
||||
- strcpy(lstn_port.sun_path, portPath->string);
|
||||
+ strlcpy(lstn_port.sun_path, portPath->string, sizeof(lstn_port.sun_path));
|
||||
|
||||
/* create a socket to listen on
|
||||
* (prepared by master so he can see the port number of the kid)
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-console_console_c,v 1.2 2005/08/02 07:25:48 pvalchev Exp $
|
||||
--- console/console.c.orig Mon Oct 25 09:18:20 2004
|
||||
+++ console/console.c Thu Jun 23 23:33:26 2005
|
||||
@@ -570,7 +570,7 @@ C2Raw()
|
||||
$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()
|
||||
Bye(EX_UNAVAILABLE);
|
||||
}
|
||||
n_tios = o_tios;
|
||||
|
@ -1,2 +0,0 @@
|
||||
You need to add a line similar to this in /etc/services
|
||||
conserver 782/tcp # console server
|
@ -1,10 +1,11 @@
|
||||
@comment $OpenBSD: PLIST,v 1.6 2004/08/09 16:27:13 espie Exp $
|
||||
bin/console
|
||||
@comment $OpenBSD: PLIST,v 1.7 2008/06/21 11:29:25 sthen Exp $
|
||||
@bin bin/console
|
||||
@man man/man1/console.1
|
||||
@man man/man5/conserver.cf.5
|
||||
@man man/man5/conserver.passwd.5
|
||||
@man man/man8/conserver.8
|
||||
sbin/conserver
|
||||
@bin sbin/conserver
|
||||
@bin sbin/conserver-convert
|
||||
share/examples/conserver/
|
||||
share/examples/conserver/README.OpenBSD
|
||||
share/examples/conserver/conserver.cf
|
||||
|
Loading…
Reference in New Issue
Block a user