summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-04-04 02:53:40 +0200
committerGünther Deschner <gd@samba.org>2008-04-04 02:53:40 +0200
commitbea4541e11f0664aaa8b62d525e0a02b14fc3afa (patch)
tree677cf0dc0f8a75aca25c60a31fd103fb81fe49b5 /source3/lib
parent69b23a39cde21989946fc9f44defec6d2302b5da (diff)
downloadsamba-bea4541e11f0664aaa8b62d525e0a02b14fc3afa.tar.gz
samba-bea4541e11f0664aaa8b62d525e0a02b14fc3afa.tar.bz2
samba-bea4541e11f0664aaa8b62d525e0a02b14fc3afa.zip
Use sid_array_from_info3 in lookup_usergroups_cached().
Guenther (This used to be commit 65b4cb20ea3fb806cfd50281e08f32bea70fafce)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_sid.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index fd2e93a697..6b83f9ce65 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -668,7 +668,8 @@ NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx,
const struct netr_SamInfo3 *info3,
DOM_SID **user_sids,
size_t *num_user_sids,
- bool include_user_group_rid)
+ bool include_user_group_rid,
+ bool skip_ressource_groups)
{
NTSTATUS status;
DOM_SID sid;
@@ -728,6 +729,12 @@ NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx,
*/
for (i = 0; i < info3->sidcount; i++) {
+
+ if (skip_ressource_groups &&
+ (info3->sids[i].attributes & SE_GROUP_RESOURCE)) {
+ continue;
+ }
+
status = add_sid_to_array(mem_ctx, info3->sids[i].sid,
&sid_array, &num_sids);
if (!NT_STATUS_IS_OK(status)) {