From d95e13e68f3c7ac517a45877b351849ef4a99b93 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 24 Feb 2006 21:36:40 +0000 Subject: r13679: Commiting the rm_primary_group.patch posted on samba-technical * ignore the primary group SID attribute from struct samu* * generate the primary group SID strictlky from the Unix primary group when dealing with passdb users * Fix memory leak in original patch caused by failing to free a talloc * * add wrapper around samu_set_unix() to prevent exposing the create BOOL to callers. Wrappers are samu_set_unix() and samu-allic_rid_unix() (This used to be commit bcf269e2ec6630b78d909010fabd3b69dd6dda84) --- source3/auth/auth_util.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source3/auth') diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index bc929fc81d..1d6a3a21a8 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1273,14 +1273,18 @@ static auth_serversupplied_info *copy_serverinfo(auth_serversupplied_info *src) sizeof(gid_t)*dst->n_groups); else dst->groups = NULL; + dst->ptok = dup_nt_token(dst, src->ptok); - dst->user_session_key = data_blob_talloc( - dst, src->user_session_key.data, + + dst->user_session_key = data_blob_talloc( dst, src->user_session_key.data, src->user_session_key.length); - dst->lm_session_key = data_blob_talloc( - dst, src->lm_session_key.data, + + dst->lm_session_key = data_blob_talloc(dst, src->lm_session_key.data, src->lm_session_key.length); - pdb_copy_sam_account(src->sam_account, &dst->sam_account); + + if ( (dst->sam_account = samu_new( NULL )) != NULL ) + pdb_copy_sam_account(dst->sam_account, src->sam_account); + dst->pam_handle = NULL; dst->unix_name = talloc_strdup(dst, src->unix_name); -- cgit