[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] trans/mtab: use setnullauth to drop privileges
From: |
Justus Winter |
Subject: |
[PATCH 1/3] trans/mtab: use setnullauth to drop privileges |
Date: |
Sun, 31 Aug 2014 16:24:59 +0200 |
* trans/mtab.c (main): Use setnullauth to drop privileges.
---
trans/mtab.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/trans/mtab.c b/trans/mtab.c
index df03b1d..5207c1e 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");
--
2.1.0