Re: xattr names for unprivileged stacking?

Al Viro
2020-08-29T19:25:58Z

On Sat, Aug 29, 2020 at 09:13:24PM +0200, Miklos Szeredi wrote:

> > d_path() is the least of the problems, actually. Directory tree structure on
> > those, OTOH, is a serious problem. If you want to have getdents(2) on that
> > shite, you want an opened descriptor that looks like a directory. And _that_
> > opens a large can of worms. Because now you have fchdir(2) to cope with,
> > lookups going through /proc/self/fd/<n>/..., etc., etc.
>
> Seriously, nobody wants fchdir(). And getdents() does not imply fchdir().

Yes, it does. If it's a directory, fchdir(2) gets to deal with it.
If it's not, no getdents(2). Unless you special-case the damn thing in
said fchdir(2).

> As for whether we'd need foobarat() on such a beast or let
> /proc/self/fd/<n> be dereferenced, I think no. So comes the argument:
> but then we'll break all those libraries and whatnot relying on these
> constructs. Well, sorry, so would we if we didn't introduce this in
> the first place. That's not really breaking anything, it's just
> setting expectations.

Translation: we'll special-case that in procfs, etc., etc. and handwave
the problems away. Lovely...