gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: disable NSS for root


From: gnunet
Subject: [gnunet] branch master updated: disable NSS for root
Date: Sat, 30 Nov 2019 23:34:56 +0100

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

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 56d734176 disable NSS for root
56d734176 is described below

commit 56d7341763046244bce789f1355441345711958c
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Nov 30 23:32:03 2019 +0100

    disable NSS for root
---
 src/gns/nss/nss_gns_query.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gns/nss/nss_gns_query.c b/src/gns/nss/nss_gns_query.c
index 4f5f06cfa..7b69282cb 100644
--- a/src/gns/nss/nss_gns_query.c
+++ b/src/gns/nss/nss_gns_query.c
@@ -63,6 +63,8 @@ gns_resolve_name (int af, const char *name, struct userdata 
*u)
   int out[2];
   pid_t pid;
 
+  if (0 == getuid ())
+    return -2; /* GNS via NSS is NEVER for root */
   if (0 != pipe (out))
     return -1;
   pid = fork ();
@@ -71,9 +73,9 @@ gns_resolve_name (int af, const char *name, struct userdata 
*u)
   if (0 == pid)
   {
     char *argv[] = { "gnunet-gns",
-                     "-r", //Raw output for easier parsing
+                     "-r", /* Raw output for easier parsing */
 #ifdef LSD001
-                     "-d", //DNS compatibility (allow IDNA names, no UTF-8)
+                     "-d", /* DNS compatibility (allow IDNA names, no UTF-8) */
 #endif
                      "-t",
                      (AF_INET6 == af) ? "AAAA" : "A",

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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