commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 54/87: trans/mtab: use setnullauth to drop privileges


From: Samuel Thibault
Subject: [hurd] 54/87: trans/mtab: use setnullauth to drop privileges
Date: Sun, 09 Nov 2014 11:05:04 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 6fd075df8f71c95cff04d58643e5da0d58dbbada
Author: Justus Winter <address@hidden>
Date:   Sun Aug 31 12:46:25 2014 +0200

    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(-)

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");
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]