[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Pgetauid/Psetauid


On Mon, Nov 15, 1999 at 04:06:47PM +0100, Konrad M. Kokoszkiewicz wrote:
> Hi,
> > > - login calls Psetauid() once the userid has been determined
> > 
> > Why should login call Psetauid()?
> Hum, perhaps for the same reason it calls Pseteuid()?

It calls Pseteuid to change persona.  It would call Psetauid to set some
information that nobody wants to know about. ;-)

> > OK, this is a different understanding.  What I understood from Tesche's
> > comment was that Pgetauid() should report which user was the first to log
> > in after system startup.
> > 
> > > Of course, this has to be supported by software (login, su at least) and
> > > of course, the auid should be inherited by child processes.
> > 
> > I don't know any software that supports it and honestly I don't see a
> > reason why any software should support it because there is no use for that
> > information.
> It is enough that the children inherit it from their parents. I didn't
> check if they do, but this may be something to fix. And the only program
> that would have to call Psetauid(), would be the login.

The problem remains: What is Psetauid/Pgetauid intended to do?  Your
understanding is something like a "castrated" session id, the answer to
the question "which user started the current session?" (whereas a session
id tells you which process has started the session).  My understanding of
Tesche's comment is different: Who was the first user to log in after
the system booted?

If you are right, then I would prefer a real session management (and you
can always find out that "auid" by reading the uid of the session leader).
If I am right, well, uhm, then it simply doesn't work at all (because
instead of setting a global variable only a process-specific variable
which is only inherited by the children of the process that set that auid
is set).