From: Stefan Metzmacher Date: Sun, 18 Jun 2017 10:06:10 +0000 (+0200) Subject: s3:smbd: only set user_info->auth_description on success X-Git-Tag: tdb-1.3.14~192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5810f7468bc0c2592056d100f3174e6e2342b3b5;p=thirdparty%2Fsamba.git s3:smbd: only set user_info->auth_description on success Otherwise we'll derefence a NULL pointer. Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index a44af7fc30b..80dc77aa468 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -937,9 +937,8 @@ void reply_sesssetup_and_X(struct smb_request *req) nt_status = NT_STATUS_NO_MEMORY; } - user_info->auth_description = "plaintext"; - if (NT_STATUS_IS_OK(nt_status)) { + user_info->auth_description = "plaintext"; nt_status = auth_check_password_session_info(plaintext_auth_context, req, user_info, &session_info); }