aboutsummaryrefslogtreecommitdiff
path: root/src/gns/nss/nss_gns_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/nss/nss_gns_query.c')
-rw-r--r--src/gns/nss/nss_gns_query.c6
1 files 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)
63 int out[2]; 63 int out[2];
64 pid_t pid; 64 pid_t pid;
65 65
66 if (0 == getuid ())
67 return -2; /* GNS via NSS is NEVER for root */
66 if (0 != pipe (out)) 68 if (0 != pipe (out))
67 return -1; 69 return -1;
68 pid = fork (); 70 pid = fork ();
@@ -71,9 +73,9 @@ gns_resolve_name (int af, const char *name, struct userdata *u)
71 if (0 == pid) 73 if (0 == pid)
72 { 74 {
73 char *argv[] = { "gnunet-gns", 75 char *argv[] = { "gnunet-gns",
74 "-r", //Raw output for easier parsing 76 "-r", /* Raw output for easier parsing */
75#ifdef LSD001 77#ifdef LSD001
76 "-d", //DNS compatibility (allow IDNA names, no UTF-8) 78 "-d", /* DNS compatibility (allow IDNA names, no UTF-8) */
77#endif 79#endif
78 "-t", 80 "-t",
79 (AF_INET6 == af) ? "AAAA" : "A", 81 (AF_INET6 == af) ? "AAAA" : "A",