[Fakeroot-commits] fakeroot--main--0.0--patch-26 commit: Support for setuid/setgid/etc.

Clint Adams schizo@costa.debian.org
Sat, 16 Apr 2005 12:46:34 +0000


2004-09-30  Timo Savola  <tsavola@movial.fi>  patch-26

	* communicate.h:
	* libfakeroot.c:

	Support for setuid/setgid/etc.

	Fake implementations for the setuid family of functions (fakeroot used to
	only provide dummy implementations).  The fake IDs are inherited by child
	processes via environment variables.  Attempts to behave according to the
	POSIX standard (= Linux man pages).

	Issues:
	* Privileges are not checked, which results in incorrect behaviour.
	  Example: process changes its (real, effective and saved) uid to 1000
	  and then tries to regain root privileges.  This should normally result
	  in an EPERM, but our implementation doesn't care...
	* If one of the setenv calls fails, the state may get corrupted.
	* Not thread-safe.

	Implemented functions: setuid, setgid, seteuid, setegid, setreuid, setregid,
	setresuid and setresgid.