From a1f66a820d78244fcab960fe33999c76cc1d65c5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 6 Sep 2000 01:06:39 +0000 Subject: 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) --- source3/smbd/password.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'source3/smbd/password.c') 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); -- cgit