projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e32996
)
disable NSS for root
author
Christian Grothoff
<christian@grothoff.org>
Sat, 30 Nov 2019 22:32:03 +0000
(23:32 +0100)
committer
Christian Grothoff
<christian@grothoff.org>
Sat, 30 Nov 2019 22:32:03 +0000
(23:32 +0100)
src/gns/nss/nss_gns_query.c
patch
|
blob
|
history
diff --git
a/src/gns/nss/nss_gns_query.c
b/src/gns/nss/nss_gns_query.c
index 4f5f06cfac26bad23557e376ae1b8f9106810b85..7b69282cb48f4531455049974879b72639465eed 100644
(file)
--- 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",