Correct check of getgrnam output
Approved by: rwatson
This commit is contained in:
parent
17469eca96
commit
01950c7ecf
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user