s3:smbd: also send the server name in the negprot response
authorStefan Metzmacher <metze@samba.org>
Fri, 4 Nov 2011 12:49:05 +0000 (13:49 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 4 Nov 2011 14:50:06 +0000 (15:50 +0100)
This matches W2K (at least sp4) and higher.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Nov  4 15:50:06 CET 2011 on sn-devel-104

source3/smbd/negprot.c

index 3afa8b19e361326c31073bef3cad3e7a4146a812..9b58a79795e9332001f35ddd88754648bfd1883e 100644 (file)
@@ -423,6 +423,14 @@ static void reply_nt1(struct smb_request *req, uint16 choice)
                        reply_nterror(req, NT_STATUS_NO_MEMORY);
                        return;
                }
+               ret = message_push_string(&req->outbuf, lp_netbios_name(),
+                                         STR_UNICODE|STR_TERMINATE
+                                         |STR_NOALIGN);
+               if (ret == -1) {
+                       DEBUG(0, ("Could not push netbios name string\n"));
+                       reply_nterror(req, NT_STATUS_NO_MEMORY);
+                       return;
+               }
                DEBUG(3,("not using SPNEGO\n"));
        } else {
                DATA_BLOB spnego_blob = negprot_spnego(req, req->sconn);