Subject: weird setuid behavior
To: None <tech-kern@netbsd.org>
From: Niels Provos <provos@citi.umich.edu>
List: tech-kern
Date: 01/21/2004 01:05:38
I am a bit puzzled by recent changes (last year) to how setuid works.
Traditionally, it has always been possible as root to call

  seteuid(someid)
  setuid(someid)

This now fails.  The call to seteuid() succeeds but the the second call
fails leaving the uid=0 and the euid=someid

Is there some logic behind this behavior?

Niels.