From 606be25ecf4a31cba9f15c43ebc650aecb17e765 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 27 May 2010 05:31:45 -0400 Subject: s3:auth Free sampass as soon as we have server_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't keep sampass in server_info anymore So it makes no sense to keep it around. Signed-off-by: Günther Deschner --- source3/auth/auth_util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/auth/auth_util.c') diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index d64cb537c7..854ab89f28 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -733,6 +733,8 @@ static NTSTATUS make_new_server_info_guest(struct auth_serversupplied_info **ser return status; } + TALLOC_FREE(sampass); + (*server_info)->guest = True; status = create_local_token(*server_info); @@ -747,7 +749,8 @@ static NTSTATUS make_new_server_info_guest(struct auth_serversupplied_info **ser (*server_info)->user_session_key = data_blob(zeros, sizeof(zeros)); (*server_info)->lm_session_key = data_blob(zeros, sizeof(zeros)); - alpha_strcpy(tmp, pdb_get_username(sampass), ". _-$", sizeof(tmp)); + alpha_strcpy(tmp, (*server_info)->info3->base.account_name.string, + ". _-$", sizeof(tmp)); (*server_info)->sanitized_username = talloc_strdup(*server_info, tmp); return NT_STATUS_OK; -- cgit