summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/hesiod.c
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2000-09-30 17:29:54 +0000
committernectar <nectar@FreeBSD.org>2000-09-30 17:29:54 +0000
commitcd493b1404e173be5cf5eb898464e1f27cdb8538 (patch)
tree95d5e09c66d25cae9b0fd79133e69a69c3cc9cfb /lib/libc/net/hesiod.c
parentbfed2c02dd111cd4967674550be04f61341fe520 (diff)
downloadFreeBSD-src-cd493b1404e173be5cf5eb898464e1f27cdb8538.zip
FreeBSD-src-cd493b1404e173be5cf5eb898464e1f27cdb8538.tar.gz
Use issetugid instead of comparing get[ug]id and gete[ug]id.
Suggested by: Don Lewis <Don.Lewis@tsc.tdk.com>
Diffstat (limited to 'lib/libc/net/hesiod.c')
-rw-r--r--lib/libc/net/hesiod.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libc/net/hesiod.c b/lib/libc/net/hesiod.c
index 220244c..2e4ff7d 100644
--- a/lib/libc/net/hesiod.c
+++ b/lib/libc/net/hesiod.c
@@ -88,14 +88,11 @@ hesiod_init(context)
{
struct hesiod_p *ctx;
const char *p, *configname;
- int trust;
-
- trust = geteuid() == getuid() && getegid() == getgid();
ctx = malloc(sizeof(struct hesiod_p));
if (ctx) {
*context = ctx;
- if (trust)
+ if (!issetugid())
configname = getenv("HESIOD_CONFIG");
else
configname = NULL;
@@ -106,7 +103,7 @@ hesiod_init(context)
* The default rhs can be overridden by an
* environment variable.
*/
- if (trust)
+ if (!issetugid())
p = getenv("HES_DOMAIN");
else
p = NULL;
OpenPOWER on IntegriCloud