diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-07-27 15:32:04 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-08-28 23:35:02 +0200 |
commit | a0ac380bb3fd07f61566511c4fdf18da748dcfa9 (patch) | |
tree | 2a9bc78d74cb9f76ce15777d33b3d2fdb50d0165 | |
parent | 4c28f07bf1fbfbcee9dcd47e8ee124567c40f5e5 (diff) |
trans: drop privileges in the null translator
* trans/null.c (main): Drop privileges.
-rw-r--r-- | trans/null.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/trans/null.c b/trans/null.c index 1f985b39..8b3b4e0f 100644 --- a/trans/null.c +++ b/trans/null.c @@ -31,6 +31,7 @@ #include <fcntl.h> #include <limits.h> #include <argp.h> +#include <nullauth.h> const char *argp_program_version = STANDARD_HURD_VERSION (null); @@ -78,6 +79,10 @@ main (int argc, char **argv) if (err) error(3, err, "Contacting parent"); + err = setnullauth (); + if (err) + error(4, err, "Dropping privileges"); + /* Launch. */ ports_manage_port_operations_multithread (fsys->pi.bucket, trivfs_demuxer, 2 * 60 * 1000, 0, 0); |