diff options
author | Volker Lendecke <vl@samba.org> | 2008-07-03 04:59:36 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-07-03 21:19:09 +0200 |
commit | 60582d1fb47cb975790915c892b849dce8518d47 (patch) | |
tree | e9ffea7127e0309c1a70b2606bc46d0bd746c654 | |
parent | 8857affd3cf9466466f1eeb2ccd8085d087bb2f2 (diff) | |
download | samba-60582d1fb47cb975790915c892b849dce8518d47.tar.gz samba-60582d1fb47cb975790915c892b849dce8518d47.tar.bz2 samba-60582d1fb47cb975790915c892b849dce8518d47.zip |
Simplify idmap_cache_set() a bit
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)
-rw-r--r-- | source3/winbindd/idmap_cache.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/winbindd/idmap_cache.c b/source3/winbindd/idmap_cache.c index 0b3c22eb20..eaff30c4e1 100644 --- a/source3/winbindd/idmap_cache.c +++ b/source3/winbindd/idmap_cache.c @@ -95,14 +95,9 @@ NTSTATUS idmap_cache_set(struct idmap_cache_ctx *cache, const struct id_map *id) 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; } |