diff options
author | nectar <nectar@FreeBSD.org> | 2000-09-30 17:29:54 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2000-09-30 17:29:54 +0000 |
commit | cd493b1404e173be5cf5eb898464e1f27cdb8538 (patch) | |
tree | 95d5e09c66d25cae9b0fd79133e69a69c3cc9cfb /lib | |
parent | bfed2c02dd111cd4967674550be04f61341fe520 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/libc/net/hesiod.c | 7 |
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; |