1 |
On Fri, 3 Feb 2017 14:29:04 -0500 |
2 |
Michael Orlitzky <mjo@g.o> wrote: |
3 |
|
4 |
> > However, it is no rocket science to write a race-free chown command |
5 |
> > in C: Just open the file and use stat() and fchown() to be sure to |
6 |
> > change only files from the "correct" user. |
7 |
> > |
8 |
> > Since this works on the filehandle and not on the filename, I think |
9 |
> > that there is no possibility for an exploit when this is used in the |
10 |
> > above find loop. |
11 |
> |
12 |
> Not a bad idea... we chould ship that safe-chown utility, and then |
13 |
> tell users how to use it to fix their UIDs. The draft that I wrote up |
14 |
> was for the "fixed UID with random fallback" model, but said utility |
15 |
> could still be useful for people who want to change their running |
16 |
> systems to use the same UIDs that would have been chosen by default. |
17 |
|
18 |
Are you sure that said utility isn’t simply “chown --from”? |
19 |
-- |
20 |
Christopher Head |