[gentoo-dev] Re: Requirements for UID/GID management

2017-02-04 Thread Martin Vaeth
Christopher Head wrote: > > Are you sure that said utility isn't simply chown --from=? As usual, I just checked the POSIX standard and not the GNU extensions before posting ;) I did now a quick audit of the coreutils-8.25 source: It seems to be safely implemented in the way I

Re: [gentoo-dev] Re: Requirements for UID/GID management

2017-02-04 Thread Michael Orlitzky
On 02/04/2017 03:50 AM, Christopher Head wrote: >> >> Not a bad idea... we chould ship that safe-chown utility, and then >> tell users how to use it to fix their UIDs. The draft that I wrote up >> was for the "fixed UID with random fallback" model, but said utility >> could still be useful for

Re: [gentoo-dev] Re: Requirements for UID/GID management

2017-02-04 Thread Christopher Head
On Fri, 3 Feb 2017 14:29:04 -0500 Michael Orlitzky wrote: > > However, it is no rocket science to write a race-free chown command > > in C: Just open the file and use stat() and fchown() to be sure to > > change only files from the "correct" user. > > > > Since this works on

Re: [gentoo-dev] Re: Requirements for UID/GID management

2017-02-03 Thread Michael Orlitzky
On 02/03/2017 09:51 AM, Martin Vaeth wrote: > Michael Orlitzky wrote: >> >> The fact that all permission and ownership information is shared is >> precisely the problem. When you change ownership of the hardlink (which >> you'll never know is a hardlink), you change ownership of

[gentoo-dev] Re: Requirements for UID/GID management

2017-02-03 Thread Martin Vaeth
Michael Orlitzky wrote: > > The fact that all permission and ownership information is shared is > precisely the problem. When you change ownership of the hardlink (which > you'll never know is a hardlink), you change ownership of /etc/shadow. Why should this be a problem except

[gentoo-dev] Re: Requirements for UID/GID management

2017-01-27 Thread Duncan
Rich Freeman posted on Fri, 27 Jan 2017 16:23:02 -0500 as excerpted: > On Fri, Jan 27, 2017 at 3:09 PM, Michael Orlitzky > wrote: >> My first impression is that any package that doesn't care about its UID >> should default to "first available", but if that causes problems, then