Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.mac.system > #127669 > unrolled thread
| Started by | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| First post | 2019-11-29 02:00 -0500 |
| Last post | 2019-12-01 12:31 +0000 |
| Articles | 20 on this page of 36 — 7 participants |
Back to article view | Back to comp.sys.mac.system
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
Page 1 of 2 [1] 2 Next page →
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2019-11-29 02:00 -0500 |
| Subject | Grabnting socket privilege to unix utilities |
| Message-ID | <ym3EF.214934$oT5.74835@fx47.iad> |
High Sierra removed many standard Unix unitilites, so I brought some over and put them in /usr/local/bin/ However: $ ping 10.0.0.20 ping: Lacking privilege for raw socket. (sudo ping will work). Is there documentation on how to give unix utilities privilege to do "raw socket" ? Is there some file I edit to add /usr/local/bin/ping in it, or some line command to bless the actual binary?
[toc] | [next] | [standalone]
| From | bje@ripco.com |
|---|---|
| Date | 2019-11-29 13:23 +0000 |
| Message-ID | <qrr64g$7hd$1@remote5bge0.ripco.com> |
| In reply to | #127669 |
JF Mezei <jfmezei.spamnot@vaxination.ca> wrote: > High Sierra removed many standard Unix unitilites, so I brought some > over and put them in /usr/local/bin/ Unless I screwed up something installing it, with High Sierra the ping program lives in /sbin and works fine as it is non-root. Maybe /sbin isn't in your path. -bruce bje@ripco.com
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2019-11-29 14:14 -0500 |
| Message-ID | <f6eEF.46412$gt2.26112@fx02.iad> |
| In reply to | #127720 |
On 2019-11-29 08:23, bje@ripco.com wrote: > Unless I screwed up something installing it, with High Sierra the ping > program lives in /sbin and works fine as it is non-root. Likely when I installed a package of Unix internet utulities to replace some of the missing ones, it installed ping with it even if High Sierra still has ping. Hoevere, question remains: what is the procedure to give a line command binary the raw socket privilege ?
[toc] | [prev] | [next] | [standalone]
| From | bje@ripco.com |
|---|---|
| Date | 2019-11-30 12:05 +0000 |
| Message-ID | <qrtltd$atm$1@remote5bge0.ripco.com> |
| In reply to | #127723 |
JF Mezei <jfmezei.spamnot@vaxination.ca> wrote: > Likely when I installed a package of Unix internet utulities to replace > some of the missing ones, it installed ping with it even if High Sierra > still has ping. Hoevere, question remains: what is the procedure to give > a line command binary the raw socket privilege ? It's sudo. Just sudo the command and be happy. It's a permission problem somewhere and appears to need to run as the privledged user (root). Since you seem intent on fucking up your mac more than it is now, I'd try to do this first: sudo chown root:wheel command-that-is-a-problem see if that works, if not, try: sudo chmod u+s command-that-is-a-problem That sets the suid bit for the command to run as the owner (root). No clue with all the SIP shit if that works but if it doesn't, too bad. It's also not a good idea to do this generally. Early svr4 systems did it alot and if there was some way to bail out of the running the command (control-c or control-d), the non-privledged user ends up as root. I'd guess it's trying to open one of the files under /dev that is marked root read/write only or group/world as read only and needs to write to it. -bruce bje@ripco.com
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2019-11-30 17:02 -0500 |
| Message-ID | <5GBEF.46443$gt2.474@fx02.iad> |
| In reply to | #127728 |
On 2019-11-30 07:05, bje@ripco.com wrote: > Just sudo the command and be happy. a pain to do this with standard commands that no longer come with OS-X. I still need telnet and ftp for instance to access some devices. > sudo chown root:wheel command-that-is-a-problem > > see if that works, if not, try: > > sudo chmod u+s command-that-is-a-problem Thanks, I can look this up. Wasn't aware if was a simple chmod command. > It's also > not a good idea to do this generally. Just want to give a replacement command the same privileges that the Apple privided one had before Apple took out the command.
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2019-11-30 23:04 -0500 |
| Message-ID | <bZGEF.113229$YF.7514@fx43.iad> |
| In reply to | #127729 |
>> sudo chown root:wheel command-that-is-a-problem The binaries in /usr/local/bin were already onwed by it. >> sudo chmod u+s command-that-is-a-problem That did the trick. "s" tells the OS to run that executable under the username of the owner of the file instead of that of the parent process (aka: the user running the command). Are there users who have enough privileges to say create sockets such as what is needed for ping, but dont have the full mights of root? (on VMS, one could grant, via the INSTALL utility, specific privileges to the app, so the app ran under your user, but the binary code was granted those specific privs (so for instance, possible to listen to a well known port, but not access all system files).
[toc] | [prev] | [next] | [standalone]
| From | Lewis <g.kreme@gmail.com.dontsendmecopies> |
|---|---|
| Date | 2019-12-01 07:29 +0000 |
| Message-ID | <slrnqu6qu1.1tlm.g.kreme@ProMini.lan> |
| In reply to | #127733 |
In message <bZGEF.113229$YF.7514@fx43.iad> JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:
>>> sudo chown root:wheel command-that-is-a-problem
> The binaries in /usr/local/bin were already onwed by it.
Generally files in /usr//local/bin should NOT be owned by root.
% ls -ls | grep root [0:20] [/usr/local/bin]
8 -rwxr-xr-x 1 root wheel 202 Oct 17 2018 fing
8 -rwxr-xr-x 1 root wheel 810 Apr 5 2019 fing-uninstall.sh
fing has to run as root.
>>> sudo chmod u+s command-that-is-a-problem
> That did the trick. "s" tells the OS to run that executable under the
> username of the owner of the file instead of that of the parent process
> (aka: the user running the command).
And because of that is *extremely* dangerous when you make root the
owner. It is much safer to simply use sudo when you need to use a tool
that requires root privs. I mean, it's unlike;y to matter with ping on
your own system, but it is definitely bas practice.
> (on VMS, one could grant, via the INSTALL utility, specific privileges
> to the app, so the app ran under your user, but the binary code was
> granted those specific privs (so for instance, possible to listen to a
> well known port, but not access all system files).
You can use the sudoers file to allow access to specific apps.
username ALL = (root:root) NOPASSWD: /path/to/executable
--
Passion is the pill you can swallow forever Taking them one by one
One by One --Agents of Good Roots "Come On"
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2019-12-01 17:25 -0500 |
| Message-ID | <W5XEF.217419$FR8.1614@fx45.iad> |
| In reply to | #127734 |
On 2019-12-01 02:29, Lewis wrote: > And because of that is *extremely* dangerous when you make root the > owner. It is much safer to simply use sudo when you need to use a tool Assuming you have access to sudo, what is the difference in level of "danger" when running app: -with sudo (app owned by yourself or with no "s" flag) OR -owned by root with the s flag don't both subprocesses created to run the binary end up running under "root" ?
[toc] | [prev] | [next] | [standalone]
| From | Lewis <g.kreme@gmail.com.dontsendmecopies> |
|---|---|
| Date | 2019-12-01 22:32 +0000 |
| Message-ID | <slrnqu8fse.287v.g.kreme@ProMini.lan> |
| In reply to | #127747 |
In message <W5XEF.217419$FR8.1614@fx45.iad> JF Mezei <jfmezei.spamnot@vaxination.ca> wrote: > On 2019-12-01 02:29, Lewis wrote: >> And because of that is *extremely* dangerous when you make root the >> owner. It is much safer to simply use sudo when you need to use a tool > Assuming you have access to sudo, What the fuck is that supposed to mean? > what is the difference in level of "danger" when running app: > -with sudo (app owned by yourself or with no "s" flag) > -owned by root with the s flag Control and security. > don't both subprocesses created to run the binary end up running under > "root" ? You still haven't learned to punctuate English, I see. -- "How good bad music and bad reasons sound when we march against an enemy." - Friedrich Nietzsche
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2019-12-01 22:36 -0500 |
| Message-ID | <cF%EF.96415$1S4.19101@fx01.iad> |
| In reply to | #127750 |
On 2019-12-01 17:32, Lewis wrote: >> Assuming you have access to sudo, > > What the fuck is that supposed to mean? Not every user is granted access to "sudo". Giving a user access to sudo (in sudoers file) means he can use sudo for ANYTHING. Giving the "ping" binary the "s" chmod bit give everyone access to the "ping"'s capabilities, but nothing else. > >> what is the difference in level of "danger" when running app: > >> -with sudo (app owned by yourself or with no "s" flag) > >> -owned by root with the s flag > > Control and security. Oet me be more precise: as the binary "acme" runs either when called from sudo, or granted the "s" bit, what are any difference in privilege, environment etc that exist?
[toc] | [prev] | [next] | [standalone]
| From | Lewis <g.kreme@gmail.com.dontsendmecopies> |
|---|---|
| Date | 2019-12-02 09:21 +0000 |
| Message-ID | <slrnqu9lt6.2g35.g.kreme@ProMini.lan> |
| In reply to | #127765 |
In message <cF%EF.96415$1S4.19101@fx01.iad> JF Mezei <jfmezei.spamnot@vaxination.ca> wrote: > On 2019-12-01 17:32, Lewis wrote: >>> Assuming you have access to sudo, >> >> What the fuck is that supposed to mean? > Not every user is granted access to "sudo". Are you no longer talking about Macs? >> Control and security. > Oet me be more precise: as the binary "acme" runs either when called > from sudo, or granted the "s" bit, what are any difference in privilege, > environment etc that exist? Control and security. -- Just give us a kiss to celebrate here, today.
[toc] | [prev] | [next] | [standalone]
| From | Jolly Roger <jollyroger@pobox.com> |
|---|---|
| Date | 2019-12-02 15:43 +0000 |
| Message-ID | <h4kpp1FjjoiU1@mid.individual.net> |
| In reply to | #127765 |
On 2019-12-02, JF Mezei <jfmezei.spamnot@vaxination.ca> wrote: > On 2019-12-01 17:32, Lewis wrote: > >>> Assuming you have access to sudo, >> >> What the fuck is that supposed to mean? > > Not every user is granted access to "sudo". > > Giving a user access to sudo (in sudoers file) means he can use sudo > for ANYTHING. That's untrue. The admin has full control over what each user can do with sudo. -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR
[toc] | [prev] | [next] | [standalone]
| From | Larry Moss <moss@airigami.com> |
|---|---|
| Date | 2019-12-02 15:47 +0000 |
| Message-ID | <slrnquachb.1i44.moss@scooter.lan> |
| In reply to | #127765 |
On 2019-12-02, JF Mezei <jfmezei.spamnot@vaxination.ca> wrote: > Giving a user access to sudo (in sudoers file) means he can use sudo for > ANYTHING. Only if you grant the user access to ALL. You can specify pretty finely what you are giving any/all users access to in the sudoers file. > Oet me be more precise: as the binary "acme" runs either when called > from sudo, or granted the "s" bit, what are any difference in privilege, > environment etc that exist? The difference isn't in privilege for that app. If it runs as root, then it runs as root. The major differences I see are: * If you use sudo, you are forcing the privileged user to know precisely when they are giving something root privileges. If you change the suid bit, the user is unaware they are doing anything special. * If the suid bit is set, it's always set. There may be a situation where you want acme to run as an ordinary user. You can't do that without changing the suid bit at that moment. * You won't necessarily remember what system level changes you made. Changing the suid bit on software that came with the system is a system level change. This can break in the future with system updates. Doing everything in the sudoers file is the officially supported way of making those changes. I know you said you installed a few utilities that weren't on your system. Changing those is less bad than changing the system. But if it's not the way the author intended them to run, the warning still applies. You should be cautious of changing an installed package. Be smart. Use sudo. Create shell aliases for the things that you need sudo for if you absolutely must. While that does hide it a bit from the user, sudo will still ask for a password, reminding you that it's running, and it has less chance of breaking things down the road.
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2019-12-02 14:33 -0500 |
| Message-ID | <GGdFF.227429$FR8.144882@fx45.iad> |
| In reply to | #127784 |
On 2019-12-02 10:47, Larry Moss wrote: > Only if you grant the user access to ALL. You can specify pretty finely > what you are giving any/all users access to in the sudoers file. Thanks. Had not realized how powerful the sudoers file can be. Though it was just a list of users who were allowed to run sudo to become any user they wanted. > The difference isn't in privilege for that app. If it runs as root, then it > runs as root. The major differences I see are: Thanks. So whether I run X with sudo or because X has the s bit (and owned by root), X runs the same. > * If the suid bit is set, it's always set. There may be a situation where > you want acme to run as an ordinary user. You can't do that without > changing the suid bit at that moment. Understood. fair point. But in the case of "ping", it has one duty and that duty requires privileges, so it is useless to try to run it unprivileged. But in the case of something like "rm", then you really really don't want to set the "s" bit on it. > Changing the suid bit on software that came with the system is a system > level change. That is the problem. Many internet utilities no longer come with the system, so you have to build them from open source or import them from older versions of OS-X. > But if > it's not the way the author intended them to run, the warning still > applies. You should be cautious of changing an installed package. But some utilities just won't run without privilege, so I have to assume that it is required when on OS-X. The author may not have intended it to require privileges, but some OS may require privileges to perform those operations. (think listening on a well known port, some OS require privileges, some don't, and some have a deamon that does that work and hands connections to the software (I beleive launchd does that job on OS-X) > Be smart. Use sudo. Create shell aliases for the things that you need > sudo for if you absolutely must. Aliasing a command for another is very dangerous. Consider the implicatiosn when you run complex scripts that you didn't write (installinG/building software for instance) where it invokes that command and gets different than expected results.
[toc] | [prev] | [next] | [standalone]
| From | Alan Baker <nunya@ness.biz> |
|---|---|
| Date | 2019-12-02 15:44 -0800 |
| Message-ID | <qs47ku$19va$1@gioia.aioe.org> |
| In reply to | #127793 |
On 2019-12-02 11:33 a.m., JF Mezei wrote: > On 2019-12-02 10:47, Larry Moss wrote: > >> Only if you grant the user access to ALL. You can specify pretty finely >> what you are giving any/all users access to in the sudoers file. > > Thanks. Had not realized how powerful the sudoers file can be. Though it > was just a list of users who were allowed to run sudo to become any user > they wanted. > > >> The difference isn't in privilege for that app. If it runs as root, then it >> runs as root. The major differences I see are: > > Thanks. So whether I run X with sudo or because X has the s bit (and > owned by root), X runs the same. > >> * If the suid bit is set, it's always set. There may be a situation where >> you want acme to run as an ordinary user. You can't do that without >> changing the suid bit at that moment. > > Understood. fair point. But in the case of "ping", it has one duty and > that duty requires privileges, so it is useless to try to run it > unprivileged. But in the case of something like "rm", then you really > really don't want to set the "s" bit on it. ping is not an SUID set utility. It's owned by root:wheel, but it's permissions are: "-r-xr-xr-x 1 root wheel 41968 24 Oct 04:40 /sbin/ping" If it were SUID, then the permissions (characters 2-4) would be: "-r-sr-xr-x"
[toc] | [prev] | [next] | [standalone]
| From | bje@ripco.com |
|---|---|
| Date | 2019-12-03 10:56 +0000 |
| Message-ID | <qs5f1l$n78$1@remote5bge0.ripco.com> |
| In reply to | #127799 |
Alan Baker <nunya@ness.biz> wrote: > ping is not an SUID set utility. Of course it's not, but he insists on using some fucked up 3rd party version. I think in the first reply I said in High Sierra it lives in /sbin which he must not have in his path. Why he wants to keep fucking around crapping up his mac is beyond me. -bruce bje@ripco.com
[toc] | [prev] | [next] | [standalone]
| From | JF Mezei <jfmezei.spamnot@vaxination.ca> |
|---|---|
| Date | 2019-12-03 16:54 -0500 |
| Message-ID | <pQAFF.189$ji7.49@fx03.iad> |
| In reply to | #127807 |
On 2019-12-03 05:56, bje@ripco.com wrote: > Of course it's not, but he insists on using some fucked up 3rd party version. Once again: found out ome standard Unix utilities missing, found official open source versions which bundled a whole bunch of them. The build process moved a bunch of them to /usr/local/bin Yes, High Sierra still has ping in /sbin and now I know I could delete the open sourced version. However, I am now puzzled on why the "standard" ping doesn't need privs but the equivalent open sourced one does. from googling for ping: ## Open a Raw socket using SOCK_RAW with protocol as IPPROTO_ICMP. Note: raw socket requires superuser rights so you have to run this code using sudo ## > I think in the first reply I said in High Sierra it lives in /sbin which > he must not have in his path. It is in the path, but /usr/local/bin is ahead to ensure that what I install get run before older stuff by Apple. (especially true on my snow leopard server where more and more components are in /usr/local as they get updated from open source),
[toc] | [prev] | [next] | [standalone]
| From | Lewis <g.kreme@gmail.com.dontsendmecopies> |
|---|---|
| Date | 2019-12-04 06:03 +0000 |
| Message-ID | <slrnquej1e.s1t.g.kreme@ProMini.lan> |
| In reply to | #127818 |
In message <pQAFF.189$ji7.49@fx03.iad> JF Mezei <jfmezei.spamnot@vaxination.ca> wrote: > On 2019-12-03 05:56, bje@ripco.com wrote: >> Of course it's not, but he insists on using some fucked up 3rd party version. > Once again: found out ome standard Unix utilities missing, No, ping is not missing. Yes, ping is in the default path. Yes, you constantly fuck up your system. > found official open source versions Official according to whom? > Yes, High Sierra still has ping in /sbin and now I know I could delete > the open sourced version. All versions of macOS (née OS X) have ping in /sbin/ -- Passion is the pill you can swallow forever Taking them one by one One by One --Agents of Good Roots "Come On"
[toc] | [prev] | [next] | [standalone]
| From | bje@ripco.com |
|---|---|
| Date | 2019-12-04 14:13 +0000 |
| Message-ID | <qs8eu1$s5f$1@remote5bge0.ripco.com> |
| In reply to | #127830 |
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
[toc] | [prev] | [next] | [standalone]
| From | Lewis <g.kreme@gmail.com.dontsendmecopies> |
|---|---|
| Date | 2019-12-05 07:06 +0000 |
| Message-ID | <slrnquhb3a.1ev0.g.kreme@ProMini.lan> |
| In reply to | #127835 |
In message <qs8eu1$s5f$1@remote5bge0.ripco.com> bje@ripco.com <bje@ripco.com> wrote: > Lewis <g.kreme@gmail.com.dontsendmecopies> wrote: >> Official according to whom? > It's probably the GNU inetutil package, > (https://www.gnu.org/software/inetutils/). Nothing official about that. I mean, I guess it's officially GNU, but that is meaningless. > The problem the village idiot is having is it's probably an old version of > inetutils. The problem is entirely the usual PEBKAC error where he fucks up his system and then complains how Apple has failed. > So I guess you need to find a way around using libpcap to get a version that > doesn't need to be suid root. Builtin ping works just fine. -- Support bacteria - they're the only culture some people have.
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.sys.mac.system
csiph-web