summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-12 23:57:10 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-12 23:57:10 +0000
commite895b9004e57c62d7517198618f9fd788107629e (patch)
treeb369bcf4236a797f059e4ea742b9f3a7059a377b /source3/auth
parentb79fa88b4db3bc88b0a5ae567b19286f64fd113c (diff)
downloadsamba-e895b9004e57c62d7517198618f9fd788107629e.tar.gz
samba-e895b9004e57c62d7517198618f9fd788107629e.tar.bz2
samba-e895b9004e57c62d7517198618f9fd788107629e.zip
Many thanks to Alexander Bokovoy <a.bokovoy@sam-solutions.net>.
This work was sponsored by Optifacio Software Services, Inc. Andrew Bartlett (various e-mails announcements merged into some form of commit message below:) This patch which adds basics of universal groups support into Samba 3. Currently, only Winbind with RPC calls supports this, ADS support requires additional (possibly huge) work on KRB5 PAC. However, basic infrastructure is here. This patch adds: 1. Storing of universal groups for particular user logged into Samba software (smbd/ two winbind-pam methods) into netlogon_unigrp.tdb as array of uint32 supplemental group rids keyed as DOMAIN_SID/USER_RID in tdb. 2. Fetching of unversal groups for given user rid and domain sid from netlogon_unigrp.tdb. Since this is used in both smbd and winbindd, main code is in source/lib/netlogon_uingrp.c. Dependencies are added to AUTH_OBJ as UNIGRP_OBJ and WINBINDD_OBJ as UNIGRP_OBJ. This patch has had a few versions, the final version in particular: Many thanks to Andrew Bartlett for critics and comments, and partly rewritten code. New: - updated fetching code to changed byte order macros - moved functions to proper namespace - optimized memory usage by reusing caller's memory context - enhanced code to more follow Samba coding rules Todo: - proper universal group expiration after timeout (This used to be commit 80c2aefbe7c1aa363dd286a47d50c5d8b4595f43)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_domain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index eba61114d6..6dcf3119ea 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -352,6 +352,10 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx,
sid_copy(&ptok->user_sids[i], &domain_sid);
sid_append_rid(&ptok->user_sids[i], info3.gids[i].g_rid);
}
+
+ become_root();
+ uni_group_cache_store_netlogon(mem_ctx, &info3);
+ unbecome_root();
}
#if 0