Subject: Re: Addition to force open to open only regular files
To: Wolfgang Solfrank <ws@tools.de>
From: Warner Losh <imp@village.org>
List: tech-kern
Date: 11/17/2000 17:32:37
In message <200011171809.TAA18122@kurt.tools.de> Wolfgang Solfrank writes:
: Maybe I'm an idiot, but can anyone please try to explain to me what
: an open_as system call would buy us above the sequence of set*id/open?
: There must be something I don't get...

1) set*id can't work.  The program may already have touched its uids,
so you don't know the right thing to use.

2) it doesn't touch the global ids, which may be impossible to
save/restore.

3) The saved ID isn't available to userland.  Note, that
POSIX_SAVED_IDS is different than this.  That's a behavior.

Of course, because of #2 open_as doesn't know what uid to pass either
:-(.

Warner