summaryrefslogtreecommitdiff
path: root/lib/libc/net/res_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/res_query.c')
-rw-r--r--lib/libc/net/res_query.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c
index 81c4d3194d3..61b6cb35c9b 100644
--- a/lib/libc/net/res_query.c
+++ b/lib/libc/net/res_query.c
@@ -368,6 +368,8 @@ __hostalias(name)
if (_res.options & RES_NOALIASES)
return (NULL);
+ if (getuid() != setuid())
+ return (NULL);
file = getenv("HOSTALIASES");
if (file == NULL || (fp = fopen(file, "r")) == NULL)
return (NULL);