Correct check of getgrnam output
Approved by: rwatson
This commit is contained in:
parent
e33042af13
commit
4786e00b40
lib
@ -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