bug-hurd
[Top][All Lists]
Advanced

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

[PATCH 2/4] trans: drop privileges in the null translator


From: Justus Winter
Subject: [PATCH 2/4] trans: drop privileges in the null translator
Date: Sat, 27 Jul 2013 15:32:04 +0200

* trans/null.c (main): Drop privileges.
---
 trans/null.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/trans/null.c b/trans/null.c
index 1f985b3..8b3b4e0 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);
-- 
1.7.10.4




reply via email to

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