pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/53322: inetutils "paths" patch, plus it needs SPECIAL_PERMS support



>Number:         53322
>Category:       pkg
>Synopsis:       inetutils "paths" patch, plus it needs SPECIAL_PERMS support
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 28 02:50:00 +0000 2018
>Originator:     Greg A. Woods
>Release:        pkgsrc-2018Q1
>Organization:
Planix, Inc.; Kelowna, BC; Canada
>Environment:
>Description:
	inetutils must install several setuid-root binaries, but if the
	package archive is built by an unprivileged user then those
	binaries will not have the necessary setuid bits

	Also building inetutils with "configure --program-prefix=g"
	causes problems for grsh and grcp since they cannot find their
	related programs (grlogin and grsh) at run time.

	Also remove options the configure script no longer honours.

>How-To-Repeat:
	In this case I discovered the problem by upgrading the Joyent
	Darwin packages on my macOS system only to find grsh abruptly
	stopped working.

		$ grsh host
		rcmd: socket: Operation not permitted

	Then after fixing the permissions manually, try to do "grsh host"
	where you don't have .rhosts set on the target system

		$ grsh host
		grsh: cannot execute /opt/pkg/bin/rlogin: No such file or directory

	Similar problems will plague any type of platform, not just
	Darwin.  Test, and test again!

>Fix:
	Fix the Makefile and add a patch for "paths" as follows:

Index: Makefile
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/net/inetutils/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	8 Sep 2017 09:45:12 -0000	1.3
+++ Makefile	28 May 2018 00:56:11 -0000
@@ -15,8 +15,10 @@
 INFO_FILES=		yes
 GNU_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--program-prefix=g
-CONFIGURE_ARGS+=	--with-path-bshell=${SH:Q}
-CONFIGURE_ARGS+=	--with-path-cp=${CP:Q}
+
+.for prog in gtraceroute grsh grlogin grcp gping gping6
+SPECIAL_PERMS+=		bin/${prog} ${SETUID_ROOT_PERMS}
+.endfor
 
 TEST_TARGET=		check
 
Index: distinfo
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/net/inetutils/distinfo,v
retrieving revision 1.1
diff -u -r1.1 distinfo
--- distinfo	7 Jul 2017 04:03:06 -0000	1.1
+++ distinfo	28 May 2018 00:56:03 -0000
@@ -4,3 +4,4 @@
 RMD160 (inetutils-1.9.4.tar.xz) = 0c144d9ac0b5c07beca1e634fc5b2c5bae15917d
 SHA512 (inetutils-1.9.4.tar.xz) = 020d1cab6659da63b26445b29820ad6769b8cf992496bece3dcbfba73804e29cc5c496d59f36046d432f9cc7fadefa3170f6d8faa855e59435aff4ecef724e66
 Size (inetutils-1.9.4.tar.xz) = 1364408 bytes
+SHA1 (patch-paths) = add4ecda99ab65ccf352814ef86b5edb54a8cabb
Index: patches/patch-paths
===================================================================
RCS file: patches/patch-paths
diff -N patches/patch-paths
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-paths	28 May 2018 00:55:50 -0000
@@ -0,0 +1,13 @@
+--- paths.orig	2015-03-31 00:06:38.000000000 -0700
++++ paths	2018-05-27 17:54:28.735960086 -0700
+@@ -95,8 +95,8 @@ PATH_LOGCONFD	$(sysconfdir)/syslog.d
+ PATH_LOGIN	x $(bindir)/login search:login
+ PATH_LOGPID	$(localstatedir)/run/syslog.pid
+ PATH_NOLOGIN	/etc/nologin
+-PATH_RLOGIN	x $(bindir)/rlogin
+-PATH_RSH	x $(bindir)/rsh
++PATH_RLOGIN	x $(bindir)/grlogin
++PATH_RSH	x $(bindir)/grsh
+ PATH_TMP	d /tmp/
+ PATH_TTY	c /dev/tty
+ PATH_UUCICO	x $(libexecdir)/uucp/uucico search:uucp/uucico:/usr/libexec:/usr/lib:/usr/etc:/etc



Home | Main Index | Thread Index | Old Index