Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #127835

Re: Grabnting socket privilege to unix utilities

From bje@ripco.com
Newsgroups comp.sys.mac.system
Subject Re: Grabnting socket privilege to unix utilities
Date 2019-12-04 14:13 +0000
Organization Ripco Communications Inc.
Message-ID <qs8eu1$s5f$1@remote5bge0.ripco.com> (permalink)
References (11 earlier) <GGdFF.227429$FR8.144882@fx45.iad> <qs47ku$19va$1@gioia.aioe.org> <qs5f1l$n78$1@remote5bge0.ripco.com> <pQAFF.189$ji7.49@fx03.iad> <slrnquej1e.s1t.g.kreme@ProMini.lan>

Show all headers | View raw


Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:

> Official according to whom?

It's probably the GNU inetutil package,
 (https://www.gnu.org/software/inetutils/).

It looks like when High Sierra came out, bunch of people grabbed it and got
it to work being telnet and ftp were removed. There actually seems to be
"download and install in /usr/local/bin/" versions floating around (no
compile needed).

No clue why they think ping was removed.

The problem the village idiot is having is it's probably an old version of
inetutils.

In a more recent version the readme shows:

Notes on setuid-executables:

 - All of the r* client commands, 'rcp', 'rlogin', 'rsh', used to need
   to be installed as setuid root to work correctly, since they use
   privileged ports for communication.  However, some modern operating
   systems now offer capabilities that avoid the need for setuid
   settings, and this is accounted for in our present code.
   CAP_NET_BIND_SERVICE and PRIV_NET_PRIVADDR are relevant for the
   above three programs.

 - Similarly, 'ping', 'ping6', and 'traceroute', used to depend on
   setuid installation, but also these are now content with
   capabilities like CAP_NET_RAW, PRIV_NET_ICMPACCESS, and
   PRIV_NET_RAWACCESS.

Not sure if High Sierra and beyond qualifies under "some modern operating
systems" but obviously from the text, using setuid root for some of the
resulting binaries was correct.

So the answer to the question, why one needs suid and the other doesn't is
simply because there is 101 ways to skin a cat. 

Different versions of the source code, type of operating system, it's
version, the compiler, version of compiler all factor in what gets
generated.

Ok, here seems to be the real answer...

On OSX, all applications using libpcap use the BPF (Berkeley Packet Filter)
devices (/dev/bpf*). Normally, only root has rw- access to them.

and sure enough...

crw-------  1 root  wheel      23,   0 Nov 14 15:01 bpf0
crw-------  1 root  wheel      23,   1 Dec  4 08:08 bpf1
crw-------  1 root  wheel      23,   2 Dec  3 07:15 bpf2
crw-------  1 root  wheel      23,   3 Nov 19 07:04 bpf3
crw-------  1 root  wheel      23,   4 Nov 14 15:01 bpf4

under High Sierra anyways.

So I guess you need to find a way around using libpcap to get a version that
doesn't need to be suid root.

-bruce
bje@ripco.com

Back to comp.sys.mac.system | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-11-29 02:00 -0500
  Re: Grabnting socket privilege to unix utilities bje@ripco.com - 2019-11-29 13:23 +0000
    Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-11-29 14:14 -0500
      Re: Grabnting socket privilege to unix utilities bje@ripco.com - 2019-11-30 12:05 +0000
        Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-11-30 17:02 -0500
          Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-11-30 23:04 -0500
            Re: Grabnting socket privilege to unix utilities Lewis <g.kreme@gmail.com.dontsendmecopies> - 2019-12-01 07:29 +0000
              Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-12-01 17:25 -0500
                Re: Grabnting socket privilege to unix utilities Lewis <g.kreme@gmail.com.dontsendmecopies> - 2019-12-01 22:32 +0000
                Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-12-01 22:36 -0500
                Re: Grabnting socket privilege to unix utilities Lewis <g.kreme@gmail.com.dontsendmecopies> - 2019-12-02 09:21 +0000
                Re: Grabnting socket privilege to unix utilities Jolly Roger <jollyroger@pobox.com> - 2019-12-02 15:43 +0000
                Re: Grabnting socket privilege to unix utilities Larry Moss <moss@airigami.com> - 2019-12-02 15:47 +0000
                Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-12-02 14:33 -0500
                Re: Grabnting socket privilege to unix utilities Alan Baker <nunya@ness.biz> - 2019-12-02 15:44 -0800
                Re: Grabnting socket privilege to unix utilities bje@ripco.com - 2019-12-03 10:56 +0000
                Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-12-03 16:54 -0500
                Re: Grabnting socket privilege to unix utilities Lewis <g.kreme@gmail.com.dontsendmecopies> - 2019-12-04 06:03 +0000
                Re: Grabnting socket privilege to unix utilities bje@ripco.com - 2019-12-04 14:13 +0000
                Re: Grabnting socket privilege to unix utilities Lewis <g.kreme@gmail.com.dontsendmecopies> - 2019-12-05 07:06 +0000
                Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-12-05 05:03 -0500
                Re: Grabnting socket privilege to unix utilities Lewis <g.kreme@gmail.com.dontsendmecopies> - 2019-12-05 11:28 +0000
                Re: Grabnting socket privilege to unix utilities bje@ripco.com - 2019-12-05 12:48 +0000
                Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-12-05 18:31 -0500
                Re: Grabnting socket privilege to unix utilities Barry Margolin <barmar@alum.mit.edu> - 2019-12-05 22:35 -0800
                Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-12-06 04:11 -0500
                Re: Grabnting socket privilege to unix utilities Barry Margolin <barmar@alum.mit.edu> - 2019-12-13 09:51 -0800
                Re: Grabnting socket privilege to unix utilities Lewis <g.kreme@gmail.com.dontsendmecopies> - 2019-12-06 07:12 +0000
                Re: Grabnting socket privilege to unix utilities Jolly Roger <jollyroger@pobox.com> - 2019-12-06 07:38 +0000
                Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-12-06 04:26 -0500
                Re: Grabnting socket privilege to unix utilities Larry Moss <moss@airigami.com> - 2019-12-03 01:15 +0000
                Re: Grabnting socket privilege to unix utilities Barry Margolin <barmar@alum.mit.edu> - 2019-12-05 22:36 -0800
            Re: Grabnting socket privilege to unix utilities Barry Margolin <barmar@alum.mit.edu> - 2019-12-01 01:01 -0800
              Re: Grabnting socket privilege to unix utilities Lewis <g.kreme@gmail.com.dontsendmecopies> - 2019-12-01 10:47 +0000
                Re: Grabnting socket privilege to unix utilities JF Mezei <jfmezei.spamnot@vaxination.ca> - 2019-12-01 17:29 -0500
            Re: Grabnting socket privilege to unix utilities bje@ripco.com - 2019-12-01 12:31 +0000

csiph-web