diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-14T10·57+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-14T10·57+0100 |
commit | a478e8a7bb8c24da0ac91b7100bd0e422035c62f (patch) | |
tree | 238363db5630470775389033e88559bce83cb66c /src/libutil | |
parent | 89e6781cc5885cbf6284a51c0403dded62ce8bc0 (diff) |
Remove nix-setuid-helper
AFAIK, nobody uses it, it's not maintained, and it has no tests.
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/util.cc | 13 | ||||
-rw-r--r-- | src/libutil/util.hh | 4 |
2 files changed, 0 insertions, 17 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 8fd61826fa28..9437a2f99a3c 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -968,19 +968,6 @@ void closeOnExec(int fd) } -void setuidCleanup() -{ - /* Don't trust the environment. */ - environ = 0; - - /* Make sure that file descriptors 0, 1, 2 are open. */ - for (int fd = 0; fd <= 2; ++fd) { - struct stat st; - if (fstat(fd, &st) == -1) abort(); - } -} - - #if HAVE_VFORK pid_t (*maybeVfork)() = vfork; #else diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 86c65b763d00..2335cbf98820 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -268,10 +268,6 @@ void closeMostFDs(const set<int> & exceptions); /* Set the close-on-exec flag for the given file descriptor. */ void closeOnExec(int fd); -/* Common initialisation for setuid programs: clear the environment, - sanitize file handles 0, 1 and 2. */ -void setuidCleanup(); - /* Call vfork() if available, otherwise fork(). */ extern pid_t (*maybeVfork)(); |