sid_check_is_in_unix_* will only give true if it is of the corresponding type,
so the check if the struct idmap actually represents a user or group is
unnecessary.
(This used to be commit
55b976ba93462c6885e8d89edd13c32fb5529944)
char *valstr;
/* Don't cache lookups in the S-1-22-{1,2} domain */
- if ( (id->xid.type == ID_TYPE_UID) &&
- sid_check_is_in_unix_users(id->sid) )
- {
- return NT_STATUS_OK;
- }
- if ( (id->xid.type == ID_TYPE_GID) &&
- sid_check_is_in_unix_groups(id->sid) )
- {
+
+ if (sid_check_is_in_unix_users(id->sid)
+ || sid_check_is_in_unix_groups(id->sid)) {
return NT_STATUS_OK;
}