From 6fd075df8f71c95cff04d58643e5da0d58dbbada Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sun, 31 Aug 2014 12:46:25 +0200 Subject: trans/mtab: use setnullauth to drop privileges * trans/mtab.c (main): Use setnullauth to drop privileges. --- trans/mtab.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'trans/mtab.c') 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 #include #include +#include #include #include #include @@ -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"); -- cgit v1.2.3