summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_pam.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-12-11 14:27:54 +0100
committerVolker Lendecke <vlendec@samba.org>2010-12-19 23:25:06 +0100
commita159958065e195413f459a82643c780d80b6c088 (patch)
tree098103983dc2f65914c3fca8249b21bbf1c85d20 /source3/winbindd/winbindd_pam.c
parente113b1c64f1dfd84911050379d06d9ffc4958db3 (diff)
downloadsamba-a159958065e195413f459a82643c780d80b6c088.tar.gz
samba-a159958065e195413f459a82643c780d80b6c088.tar.bz2
samba-a159958065e195413f459a82643c780d80b6c088.zip
s3: wcache_invalidate_samlogon only needs the SID
Diffstat (limited to 'source3/winbindd/winbindd_pam.c')
-rw-r--r--source3/winbindd/winbindd_pam.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 7ec0bff9a7..5347c1cd45 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -1527,7 +1527,11 @@ process_result:
goto done;
}
- wcache_invalidate_samlogon(find_domain_from_name(name_domain), info3);
+ sid_compose(&user_sid, info3->base.domain_sid,
+ info3->base.rid);
+
+ wcache_invalidate_samlogon(find_domain_from_name(name_domain),
+ &user_sid);
netsamlogon_cache_store(name_user, info3);
/* save name_to_sid info as early as possible (only if
@@ -1535,8 +1539,6 @@ process_result:
the cache entry by storing the seq_num for the wrong
domain). */
if ( domain->primary ) {
- sid_compose(&user_sid, info3->base.domain_sid,
- info3->base.rid);
cache_name2sid(domain, name_domain, name_user,
SID_NAME_USER, &user_sid);
}
@@ -1744,8 +1746,12 @@ enum winbindd_result winbindd_dual_pam_auth_crap(struct winbindd_domain *domain,
process_result:
if (NT_STATUS_IS_OK(result)) {
+ struct dom_sid user_sid;
- wcache_invalidate_samlogon(find_domain_from_name(name_domain), info3);
+ sid_compose(&user_sid, info3->base.domain_sid,
+ info3->base.rid);
+ wcache_invalidate_samlogon(find_domain_from_name(name_domain),
+ &user_sid);
netsamlogon_cache_store(name_user, info3);
/* Check if the user is in the right group */