]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: only set user_info->auth_description on success
authorStefan Metzmacher <metze@samba.org>
Sun, 18 Jun 2017 10:06:10 +0000 (12:06 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 26 Jun 2017 06:47:14 +0000 (08:47 +0200)
Otherwise we'll derefence a NULL pointer.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/smbd/sesssetup.c

index a44af7fc30bf28f5d28992b7f17ed79983059e2d..80dc77aa468ea9c38510fa31a5b7c1cd3a4fd366 100644 (file)
@@ -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);
                        }