From b0f666a71ef321b5fadf80539aa1e27d0e7d1366 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sun, 18 Aug 1996 19:07:27 +0000 Subject: if setuid, no env variables --- src/lib/libc/net/res_query.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib/libc/net/res_query.c') diff --git a/src/lib/libc/net/res_query.c b/src/lib/libc/net/res_query.c index 81c4d3194d..61b6cb35c9 100644 --- a/src/lib/libc/net/res_query.c +++ b/src/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); -- cgit v1.2.3-55-g6feb