summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjedgar <jedgar@FreeBSD.org>2001-01-07 21:41:05 +0000
committerjedgar <jedgar@FreeBSD.org>2001-01-07 21:41:05 +0000
commit01950c7ecf456a572d221cc676b88124a239e333 (patch)
tree08d9f143df8935773a5b19a12ed94643b2dcb0dc /lib
parent17469eca96cfd06d60f599ae2847d7cee8f158bc (diff)
downloadFreeBSD-src-01950c7ecf456a572d221cc676b88124a239e333.zip
FreeBSD-src-01950c7ecf456a572d221cc676b88124a239e333.tar.gz
Correct check of getgrnam output
Approved by: rwatson
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/posix1e/acl_support.c2
-rw-r--r--lib/libposix1e/acl_support.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/posix1e/acl_support.c b/lib/libc/posix1e/acl_support.c
index a136407..f2e83b7 100644
--- a/lib/libc/posix1e/acl_support.c
+++ b/lib/libc/posix1e/acl_support.c
@@ -302,7 +302,7 @@ acl_name_to_id(acl_tag_t tag, char *name, uid_t *id)
case ACL_GROUP:
g = getgrnam(name);
- if (g) {
+ if (!g) {
errno = EINVAL;
return (-1);
}
diff --git a/lib/libposix1e/acl_support.c b/lib/libposix1e/acl_support.c
index a136407..f2e83b7 100644
--- a/lib/libposix1e/acl_support.c
+++ b/lib/libposix1e/acl_support.c
@@ -302,7 +302,7 @@ acl_name_to_id(acl_tag_t tag, char *name, uid_t *id)
case ACL_GROUP:
g = getgrnam(name);
- if (g) {
+ if (!g) {
errno = EINVAL;
return (-1);
}
OpenPOWER on IntegriCloud