Re: [Toybox] [landley/toybox] install -d -o USER -g GROUP DEST doesn't set uid/gid (#105)

2018-11-18 Thread Rob Landley
On 11/17/18 8:22 PM, scsijon wrote: >> > > Arn't they part of stat? > > I believe openbsd have a getfsuid(), though not sure how good it is. Yeah, I could open(O_NOFOLLOW) the file, confirm it's a directory, fstat(), fchown() with the same filehandle, and close(). It's just 3 times longer than

Re: [Toybox] [landley/toybox] install -d -o USER -g GROUP DEST doesn't set uid/gid (#105)

2018-11-17 Thread scsijon
Message: 2 Date: Sat, 17 Nov 2018 12:28:32 -0600 From: Rob Landley To: reply+001597098b9d9b8e3d721b2b98b1330abe67582879274d3792cf000117f33b1392a169ce16724...@reply.github.com, toybox Subject: Re: [Toybox] [landley/toybox] install -d -o USER -g GROUP DEST doesn't

Re: [Toybox] [landley/toybox] install -d -o USER -g GROUP DEST doesn't set uid/gid (#105)

2018-11-17 Thread Rob Landley
On 11/1/18 5:07 PM, Volodymyr Medvid wrote: > "install -d" doesn't honor custom uid/gid. > install_main returns early if (flags & FLAG_d), doing mkpathat without fchown. Hmmm... I just pushed a patch to that, but it's not quiet right. When calling lchown() it does xgetuid() and xgetgid() for the