Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-26 Thread Peter Stuge
Mike Gilbert wrote:
> > I would like for us to discuss adding the sbin directories to PATH for
> > all users.
> 
> I support this idea. The distinction between bin and sbin is stupid.

I support it too FWIW.


//Peter



Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Kristian Fiskerstrand
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 11/25/2015 06:10 PM, William Hubbs wrote:
> All,
> 
> I would like for us to discuss adding the sbin directories to PATH
> for all users.
> 

This sounds strange to me, if it should be executable by all users it
likely shouldn't be in sbin in the first place but in bin. In any
case; I don't see any good reason to change the traditional behavior
of sbin only being in path for root.

- -- 
Kristian Fiskerstrand
Public PGP key 0xE3EDFAE3 at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3
-BEGIN PGP SIGNATURE-

iQEcBAEBCgAGBQJWVfF/AAoJECULev7WN52FKHkH/2z2lGrmC6jQn4+gAizDKX02
bHmuMK2j3TS5UZsA+YQSzTlT7OddlC2PGDvbuaGz5bZMcUMeaE9nTvr8EgkTRKEn
sAzTH8ojQtpk68+BlKMz1WjW46LWZWAcSxuaVTqNK5OIAy22eqrdv2kwKoupakv+
0GescG/kuLpx7uwlrzF5qrEQRyC+Ht4s71U+G0oWfb97Lh2iBn0aEyoxN1weWLDp
TYE/MzklKRrKrnikci6kXTewgfGQzIP64VZA+rdb8LOQaL5yTxxbUDjVN4HbMz2m
dZLNewKhwJUUYqupUGCIameKPtjBM3ianl+2BdzWcwUavVNuKBKEUFkj2VK/UBg=
=mvdt
-END PGP SIGNATURE-



Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Michael Orlitzky
On 11/25/2015 12:10 PM, William Hubbs wrote:
> All,
> 
> I would like for us to discuss adding the sbin directories to PATH for
> all users.
> 
> 

The only thing that procps installs in /sbin is sysctl. Why? It works
when run as a normal user, as long as you don't try to change something
sacred. (In that regard, it's no different than, say, rm.)





Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Michał Górny
On Wed, 25 Nov 2015 19:05:13 +0100
Ulrich Mueller  wrote:

> > On Wed, 25 Nov 2015, Kristian Fiskerstrand wrote:  
> 
> > On 11/25/2015 06:10 PM, William Hubbs wrote:  
> >> I would like for us to discuss adding the sbin directories to PATH
> >> for all users.  
> 
> > This sounds strange to me, if it should be executable by all users
> > it likely shouldn't be in sbin in the first place but in bin. In any
> > case; I don't see any good reason to change the traditional behavior
> > of sbin only being in path for root.  
> 
> +1
> 
> The sbin directories are separate from bin for the very reason that
> binaries in there (which are only usable with elevated privileges) can
> be excluded from normal users' PATH.

Binaries like blkid, btrfs, getcap, sensors, swapon and various tools
from net-tools, iputils, wireless-tools... and I really have better
things to do than list all tools that landed in sbin for some fun
reason yet work for normal users.

But well, I'm the weird one wanting to be able to check how much free
space I've got without going through hoops.

-- 
Best regards,
Michał Górny



pgpwp9k1PpFXz.pgp
Description: OpenPGP digital signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Ulrich Mueller
> On Wed, 25 Nov 2015, William Hubbs wrote:
 
> This behaviour is not really that traddditional. most *nix's I've
> seen have the sbin directories in the path for all users.

Traditional Unices didn't have /sbin at all. Instead, they used /etc
for such binaries. :)

(Some remnants of this can still be seen today, like /etc/rmt
installed by app-arch/tar.)

Ulrich


pgpk6xDi_7c_q.pgp
Description: PGP signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Mike Gilbert
On Wed, Nov 25, 2015 at 4:39 PM, Andrew Savchenko  wrote:
> On Wed, 25 Nov 2015 11:10:11 -0600 William Hubbs wrote:
>> All,
>>
>> I would like for us to discuss adding the sbin directories to PATH for
>> all users.
>>
>> The only reason I can think of that we have removed them is cosmetic (it
>> removes things from tab completion), but I have also heard that having
>> those things in tab completion would be a good thing.
>>
>> Another reason I am bringing this up is this bug [1]. On standard OSx,
>> there is no reason to hard code the path to sysctl like I'm being asked
>> to do in the patch associated with this bug, because the sbin
>> directories are always  in the path. In other words, it isn't worth the
>> effort to send this patch upstream, which means there will always be a
>> Gentoo-specific patch to dev-lang/go unless upstream finds another way
>> to do the test they are doing on OSx via sysctl.
>>
>> Any ideas?
>
> +1. Just do it.
>
> I add /sbin and /usr/sbin in PATH on all Gentoo setups for ages.
> Too many useful tools are there. Though, add them after /bin
> and /usr/sbin for non-priviledged users and before for root.

Swapping the order is silly and should be pointless. If we are
installing different binaries with the same name in bin/sbin, that's a
bug that needs fixing.



Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Nicolas Sebrecht
On Wed, Nov 25, 2015 at 11:10:11AM -0600, William Hubbs wrote:

> I would like for us to discuss adding the sbin directories to PATH for
> all users.

Binaries that can run with user privileges could be symbolic linked to
/bin.

-- 
Nicolas Sebrecht



Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread William Hubbs
On Wed, Nov 25, 2015 at 07:51:55PM +0100, Ulrich Mueller wrote:
> > On Wed, 25 Nov 2015, William Hubbs wrote:
> 
> > From what I've read, the traditional difference between bin and sbin
> > was that sbin means static-bin and everything stored in there was to
> > be able to come up without libraries.
> 
> Source/reference for this?
 
 https://news.ycombinator.com/item?id=3519952

> > As mgorny was talking about earlier, a good chunk of what is in sbin
> > *can* be run by normal users.
> 
> Then it shouldn't be in sbin, in the first place. That's a separate
> discussion though.

 Also, there is another source that talks about why the split originally
 happened and why it meant basically nothing, even before the days of
 Linux.

 
http://www.osnews.com/story/25556/Understanding_the_bin_sbin_usr_bin_usr_sbin_Split/

William



signature.asc
Description: Digital signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread William Hubbs
On Wed, Nov 25, 2015 at 07:31:14PM +0100, Ulrich Mueller wrote:
> > On Wed, 25 Nov 2015, William Hubbs wrote:
>  
> > This behaviour is not really that traddditional. most *nix's I've
> > seen have the sbin directories in the path for all users.
> 
> Traditional Unices didn't have /sbin at all. Instead, they used /etc
> for such binaries. :)

From what I've read, the traditional difference between bin and sbin was
that sbin means static-bin and everything stored in there was to be able
to come up without libraries.

As mgorny was talking about earlier, a good chunk of what is in sbin
*can* be run by normal users.

William



signature.asc
Description: Digital signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Daniel Campbell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 11/25/2015 10:17 AM, Michał Górny wrote:
> On Wed, 25 Nov 2015 19:05:13 +0100 Ulrich Mueller 
> wrote:
> 
>>> On Wed, 25 Nov 2015, Kristian Fiskerstrand wrote:
>> 
>>> On 11/25/2015 06:10 PM, William Hubbs wrote:
 I would like for us to discuss adding the sbin directories to
 PATH for all users.
>> 
>>> This sounds strange to me, if it should be executable by all
>>> users it likely shouldn't be in sbin in the first place but in
>>> bin. In any case; I don't see any good reason to change the
>>> traditional behavior of sbin only being in path for root.
>> 
>> +1
>> 
>> The sbin directories are separate from bin for the very reason
>> that binaries in there (which are only usable with elevated
>> privileges) can be excluded from normal users' PATH.
> 
> Binaries like blkid, btrfs, getcap, sensors, swapon and various
> tools from net-tools, iputils, wireless-tools... and I really have
> better things to do than list all tools that landed in sbin for
> some fun reason yet work for normal users.
> 
> But well, I'm the weird one wanting to be able to check how much
> free space I've got without going through hoops.
> 

Maybe I'm missing something, but `df` is in /bin. Do you use something
else to determine free space?

- -- 
Daniel Campbell - Gentoo Developer
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
fpr: AE03 9064 AE00 053C 270C  1DE4 6F7A 9091 1EA0 55D6
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWVgmJAAoJEAEkDpRQOeFwEQIQAIoen/Ay5+fjY3mJfZn7NCKs
jrhvtaj4ZOexQ2RPt7vW1HfihtueWXWZrnkpA3wnWl5xryv++S1G9WLn/2+I3uQc
y1D63z6Cu3pet+hDdCRM57oS3kdx9DMzjWIUpkohwdxal7MTnwGgh2K4oMotX3P2
npctie/gKwUEGLipqjsOR2pwt1dVSyx5NJPboUydhQW6lBghQoj0Cmcz46niqlva
aOGn93OcTlhySrwsVzbTWS6iJm0R3Ztm2oIkDmIikqJzEJA3UzKysWnlHqw8ZmPn
HEyAqOQ7mrgKliMTcJqFkhhieTPjMUK5L8UzA6gduucAb0XumrWt7I/i0CdRKiw5
VrQw48aCR0RIZx2V3qakRk/bVuPCaSDmXH31dxF0CEs1r4FXg4fBO8/ahjna7QC+
aimRxPLWKLStJQPdo4Lr7xF0JLDjdrT/oLBdqGp+Vz646AdXBHVfdBI+zxpGRgFj
SljKvnjv5+2BDvXAZvE+tImAPJVqV1YivHdo/htKSnJhWeFCVNwhS98SqLG+PJFa
QOvp0Mz/EflHKXiHfhB5QBfiVsNGoiti2EO8tP77IwBZ0WUvCotiZKVsqfydkxr3
QWxfaGgFIPmV9++xJ//AvSnCUmSBS+8jk3kBSlY6Gxju5t7QVu+Ulxv82dLooUO7
fABFJx4Jau7/8p2K1XMW
=Ym0P
-END PGP SIGNATURE-



Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Michał Górny
On Wed, 25 Nov 2015 11:18:34 -0800
Daniel Campbell  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> On 11/25/2015 10:17 AM, Michał Górny wrote:
> > On Wed, 25 Nov 2015 19:05:13 +0100 Ulrich Mueller 
> > wrote:
> >   
> >>> On Wed, 25 Nov 2015, Kristian Fiskerstrand wrote:  
> >>   
> >>> On 11/25/2015 06:10 PM, William Hubbs wrote:  
>  I would like for us to discuss adding the sbin directories to
>  PATH for all users.  
> >>   
> >>> This sounds strange to me, if it should be executable by all
> >>> users it likely shouldn't be in sbin in the first place but in
> >>> bin. In any case; I don't see any good reason to change the
> >>> traditional behavior of sbin only being in path for root.  
> >> 
> >> +1
> >> 
> >> The sbin directories are separate from bin for the very reason
> >> that binaries in there (which are only usable with elevated
> >> privileges) can be excluded from normal users' PATH.  
> > 
> > Binaries like blkid, btrfs, getcap, sensors, swapon and various
> > tools from net-tools, iputils, wireless-tools... and I really have
> > better things to do than list all tools that landed in sbin for
> > some fun reason yet work for normal users.
> > 
> > But well, I'm the weird one wanting to be able to check how much
> > free space I've got without going through hoops.
> >   
> 
> Maybe I'm missing something, but `df` is in /bin. Do you use something
> else to determine free space?

btrfs fi df

-- 
Best regards,
Michał Górny



pgp7BaAMfEfVH.pgp
Description: OpenPGP digital signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Ulrich Mueller
> On Wed, 25 Nov 2015, Kristian Fiskerstrand wrote:

> On 11/25/2015 06:10 PM, William Hubbs wrote:
>> I would like for us to discuss adding the sbin directories to PATH
>> for all users.

> This sounds strange to me, if it should be executable by all users
> it likely shouldn't be in sbin in the first place but in bin. In any
> case; I don't see any good reason to change the traditional behavior
> of sbin only being in path for root.

+1

The sbin directories are separate from bin for the very reason that
binaries in there (which are only usable with elevated privileges) can
be excluded from normal users' PATH.

Users who for whatever reason want these directories in their PATH can
include them in their local settings, but as the general default it
makes no sense.

Ulrich


pgp53L9JqZfUe.pgp
Description: PGP signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread William Hubbs
On Wed, Nov 25, 2015 at 06:36:03PM +0100, Kristian Fiskerstrand wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> On 11/25/2015 06:10 PM, William Hubbs wrote:
> > All,
> > 
> > I would like for us to discuss adding the sbin directories to PATH
> > for all users.
> > 
> 
> This sounds strange to me, if it should be executable by all users it
> likely shouldn't be in sbin in the first place but in bin. In any
> case; I don't see any good reason to change the traditional behavior
> of sbin only being in path for root.
 
This behaviour is not really that traddditional. most *nix's I've seen
have the sbin directories in the path for all users.

I wanted to open the discussion, because the fact that we remove sbin
from paths was cited on the bug I referred to as a reason I should keep
the patch that the prefix team applied to dev-lang/go.

My opinion is prefix should either fix their paths (include /sbin) even
though they are running unprivileged, or it would be better even if they
found a way to do the same test that did not require access to sbin and
contributed that to Go upstream.

William



signature.asc
Description: Digital signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Ulrich Mueller
> On Wed, 25 Nov 2015, William Hubbs wrote:

> From what I've read, the traditional difference between bin and sbin
> was that sbin means static-bin and everything stored in there was to
> be able to come up without libraries.

Source/reference for this?

> As mgorny was talking about earlier, a good chunk of what is in sbin
> *can* be run by normal users.

Then it shouldn't be in sbin, in the first place. That's a separate
discussion though.

Ulrich


pgpwngU3V2pmA.pgp
Description: PGP signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Mike Gilbert
On Wed, Nov 25, 2015 at 12:10 PM, William Hubbs  wrote:
> All,
>
> I would like for us to discuss adding the sbin directories to PATH for
> all users.

I support this idea. The distinction between bin and sbin is stupid.



Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Mike Gilbert
On Wed, Nov 25, 2015 at 2:23 PM, Michał Górny  wrote:
> On Wed, 25 Nov 2015 11:18:34 -0800
> Daniel Campbell  wrote:
>> Maybe I'm missing something, but `df` is in /bin. Do you use something
>> else to determine free space?
>
> btrfs fi df

In thins case, upstream's build system installs everything in bindir,
which I override to /sbin. I think that's where the ebuild was
installing things when I inherited it from the previous maintainer.

If William's PATH proposal is not implemented, I would be happy to
move it all to /bin if so desired. Just file a bug.



Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Ulrich Mueller
> On Wed, 25 Nov 2015, William Hubbs wrote:

>> > From what I've read, the traditional difference between bin and sbin
>> > was that sbin means static-bin and everything stored in there was to
>> > be able to come up without libraries.
>> 
>> Source/reference for this?
 
> https://news.ycombinator.com/item?id=3519952

Hm, SunOS end of 1980s. Soon after (Solaris 2.0 ca. 1992) they
switched to the current meaning and had executables in /usr/sbin
"to be run only by system administrators":
https://docs.oracle.com/cd/E26505_01/html/816-5175/filesystem-5.html

Anyway, whatever the history is, I guess we should go with the current
FHS definition of sbin.

Ulrich


pgpkEBQe21h0o.pgp
Description: PGP signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread splite-gentoo
On Wed, Nov 25, 2015 at 07:51:55PM +0100, Ulrich Mueller wrote:
> > On Wed, 25 Nov 2015, William Hubbs wrote:
>> From what I've read, the traditional difference between bin and sbin
>> was that sbin means static-bin and everything stored in there was to
>> be able to come up without libraries.
> 
> Source/reference for this?

Some of us are old enough to remember when it happened, sonny.  It was
Sun's idea.  Disks were expensive, so they wanted as much of the OS to be
mountable read-only via NFS as possible (remember diskless workstations?
no, you probably don't), so they moved /bin and /lib to /usr and replaced
them with symlinks.  /sbin was created to hold the necessary binaries
to get /usr mounted via NFS at boot.  They had to be statically-linked
because all the shared libraries were in /usr-- hence the "s" in "sbin".

If you really want a reference, here you go (page 7):

http://chiclassiccomp.org/docs/content/computing/Sun/800-1731-10_SunOS4.0ChangeNotes9May88.pdf

>> As mgorny was talking about earlier, a good chunk of what is in sbin
>> *can* be run by normal users.
> 
> Then it shouldn't be in sbin, in the first place. That's a separate
> discussion though.

Bollocks.  The whole "/sbin is for admins" meme is an after-the-fact
fabrication by those too young to remember the original purpose for it.
(Unfortunately, that included people at Sun.)

Now, get off my lawn.



Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Anthony G. Basile
On 11/25/15 1:58 PM, Mike Gilbert wrote:
> On Wed, Nov 25, 2015 at 12:10 PM, William Hubbs  wrote:
>> All,
>>
>> I would like for us to discuss adding the sbin directories to PATH for
>> all users.
> I support this idea. The distinction between bin and sbin is stupid.
>
I'm okay with this.  Should we do the same for /usr/bin and /usr/sbin ?

-- 
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail: bluen...@gentoo.org
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA




Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Andrew Savchenko
On Wed, 25 Nov 2015 11:10:11 -0600 William Hubbs wrote:
> All,
> 
> I would like for us to discuss adding the sbin directories to PATH for
> all users.
> 
> The only reason I can think of that we have removed them is cosmetic (it
> removes things from tab completion), but I have also heard that having
> those things in tab completion would be a good thing.
> 
> Another reason I am bringing this up is this bug [1]. On standard OSx,
> there is no reason to hard code the path to sysctl like I'm being asked
> to do in the patch associated with this bug, because the sbin
> directories are always  in the path. In other words, it isn't worth the
> effort to send this patch upstream, which means there will always be a
> Gentoo-specific patch to dev-lang/go unless upstream finds another way
> to do the test they are doing on OSx via sysctl.
> 
> Any ideas?

+1. Just do it.

I add /sbin and /usr/sbin in PATH on all Gentoo setups for ages.
Too many useful tools are there. Though, add them after /bin
and /usr/sbin for non-priviledged users and before for root.

Best regards,
Andrew Savchenko


pgpClAaQ6AwxP.pgp
Description: PGP signature


Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread Kristian Fiskerstrand
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 11/25/2015 09:16 PM, Mike Gilbert wrote:
> On Wed, Nov 25, 2015 at 2:23 PM, Michał Górny 
> wrote:
>> On Wed, 25 Nov 2015 11:18:34 -0800 Daniel Campbell
>>  wrote:
>>> Maybe I'm missing something, but `df` is in /bin. Do you use
>>> something else to determine free space?
>> 
>> btrfs fi df
> 
> In thins case, upstream's build system installs everything in
> bindir, which I override to /sbin. I think that's where the ebuild
> was installing things when I inherited it from the previous
> maintainer.
> 
> If William's PATH proposal is not implemented, I would be happy to 
> move it all to /bin if so desired. Just file a bug.

If moving it in the first place, wouldn't it go to /usr/bin as not
being essential to system?


- -- 
Kristian Fiskerstrand
Public PGP key 0xE3EDFAE3 at hkp://pool.sks-keyservers.net
fpr:94CB AFDD 3034 5109 5618 35AA 0B7F 8B60 E3ED FAE3
-BEGIN PGP SIGNATURE-

iQEcBAEBCgAGBQJWVhbkAAoJECULev7WN52FBZMIAI4Lpt4/acpXIld2Y4s+dX+p
P5pzzrPtjy76JBxwlRr0eSqwktmZfgu/4gnZUfew1ihMPrezEpZa3ulLnvNyJEfL
vWfcmSFAetcY/Txi3liX7oDqvCdm2w6EU8ffE3GRxR6SRzg8EUPALo66l6hLEqOM
7DKdRNBCIOG5TLOHLt1WVq9nbcuePVbA46JCCWhTdF1MTV2eWXx45vT3OxRvZbkd
szHOezMBVg/YrSQcapWF6OaPw4qt9hcyPep/w284n9BE8mbP0eHCMFl0pJ3kMmwE
nsanXA8l4kOjsJPeX6FgO2G89AJib/0pEAMgjUlDtsVHmsPsrz3MxfhBNHATsXg=
=oZ3P
-END PGP SIGNATURE-



Re: [gentoo-dev] rfc: adding sbin directories to PATH for all users

2015-11-25 Thread William Hubbs
On Wed, Nov 25, 2015 at 09:53:47PM +0100, Ulrich Mueller wrote:
> > On Wed, 25 Nov 2015, William Hubbs wrote:
> 
> >> > From what I've read, the traditional difference between bin and sbin
> >> > was that sbin means static-bin and everything stored in there was to
> >> > be able to come up without libraries.
> >> 
> >> Source/reference for this?
>  
> > https://news.ycombinator.com/item?id=3519952
> 
> Hm, SunOS end of 1980s. Soon after (Solaris 2.0 ca. 1992) they
> switched to the current meaning and had executables in /usr/sbin
> "to be run only by system administrators":
> https://docs.oracle.com/cd/E26505_01/html/816-5175/filesystem-5.html
 
Solaris was also the first *nix to adopt the /usr merge (/bin /sbin and
/usr/sbin all are just links to /usr/bin), but that's a topic for
another thread.

William



signature.asc
Description: Digital signature