NetBSD Problem Report #53322
From woods@mail.weird.com Mon May 28 02:45:16 2018
Return-Path: <woods@mail.weird.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 5223B7A237
for <gnats-bugs@www.NetBSD.org>; Mon, 28 May 2018 02:45:16 +0000 (UTC)
Message-Id: <m1fN76G-0036tNC@more.local>
Date: Sun, 27 May 2018 18:37:28 -0700 (PDT)
From: "Greg A. Woods" <woods@planix.ca>
Sender: "Greg A. Woods" <woods@mail.weird.com>
Reply-To: "Greg A. Woods" <woods@planix.ca>
To: gnats-bugs@gnats.NetBSD.org
Subject: inetutils "paths" patch, plus it needs SPECIAL_PERMS support
X-Send-Pr-Version: 3.95
>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
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.