summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-24 21:36:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:23 -0500
commitd95e13e68f3c7ac517a45877b351849ef4a99b93 (patch)
tree392a8d4445623c60746e444e148b2a4e12ebeaba /source3/auth
parent2b0277a1d6df176a90f895b9d0582db384fcc6a8 (diff)
downloadsamba-d95e13e68f3c7ac517a45877b351849ef4a99b93.tar.gz
samba-d95e13e68f3c7ac517a45877b351849ef4a99b93.tar.bz2
samba-d95e13e68f3c7ac517a45877b351849ef4a99b93.zip
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)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c14
1 files changed, 9 insertions, 5 deletions
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);