summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-09-06 01:06:39 +0000
committerJeremy Allison <jra@samba.org>2000-09-06 01:06:39 +0000
commita1f66a820d78244fcab960fe33999c76cc1d65c5 (patch)
tree865aebe7877f3e7844df8d109f842be0f3edd9dd /source3/smbd
parentd644d4438cfef54733118cbd09f89518ffb318ca (diff)
downloadsamba-a1f66a820d78244fcab960fe33999c76cc1d65c5.tar.gz
samba-a1f66a820d78244fcab960fe33999c76cc1d65c5.tar.bz2
samba-a1f66a820d78244fcab960fe33999c76cc1d65c5.zip
Fix for the SID history problem when using a Win2k domain controller
with security=domain. Also fixed to dynamically allocate the SIDs and GIDs. Jeremy. (This used to be commit 2b1f66eb82f05fe0b85ac5b4916e32847b8de675)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/password.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 9e59815e52..6d3a2d1a31 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -1487,19 +1487,12 @@ BOOL domain_client_validate( char *user, char *domain,
cli_ulogoff(&cli);
cli_shutdown(&cli);
- /* unused, so delete here. */
- if (info3.gids != NULL)
- free (info3.gids);
-
if((nt_rpc_err == NT_STATUS_NO_SUCH_USER) && (user_exists != NULL))
*user_exists = False;
return False;
}
- /* unused, so delete here. */
- if (info3.gids != NULL)
- free (info3.gids);
/*
* Here, if we really want it, we have lots of info about the user in info3.
*/
@@ -1521,6 +1514,10 @@ BOOL domain_client_validate( char *user, char *domain,
}
#endif /* 0 */
+ /* Note - once the cli stream is shutdown the mem_ctx used
+ to allocate the other_sids and gids structures has been deleted - so
+ these pointers are no longer valid..... */
+
cli_nt_session_close(&cli);
cli_ulogoff(&cli);
cli_shutdown(&cli);