summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-08-31 12:46:25 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-08-31 16:40:55 +0200
commit6fd075df8f71c95cff04d58643e5da0d58dbbada (patch)
treef314f64fa27feb47a582a653e4b7656755248133 /trans
parentcf8df03cf9002642a9399da47242d819cc3653e4 (diff)
trans/mtab: use setnullauth to drop privileges
* trans/mtab.c (main): Use setnullauth to drop privileges.
Diffstat (limited to 'trans')
-rw-r--r--trans/mtab.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/trans/mtab.c b/trans/mtab.c
index df03b1d3..5207c1ea 100644
--- a/trans/mtab.c
+++ b/trans/mtab.c
@@ -27,6 +27,7 @@
#include <hurd/trivfs.h>
#include <inttypes.h>
#include <mntent.h>
+#include <nullauth.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
@@ -221,19 +222,7 @@ main (int argc, char *argv[])
if (bootstrap != MACH_PORT_NULL)
{
/* Started as a translator. */
-
- auth_t nullauth;
- err = auth_makeauth (getauth (),
- NULL, MACH_MSG_TYPE_COPY_SEND, 0,
- NULL, 0,
- NULL, 0,
- NULL, 0,
- NULL, 0,
- &nullauth);
- if (err)
- error (3, err, "dropping credentials");
-
- err = setauth (nullauth);
+ err = setnullauth ();
if (err)
error (3, err, "dropping credentials");