summaryrefslogtreecommitdiff
path: root/libcli/auth
diff options
context:
space:
mode:
authorChristian Ambach <christian.ambach@de.ibm.com>2011-04-07 14:01:50 +0200
committerAndrew Bartlett <abartlet@samba.org>2011-04-14 01:32:22 +0200
commit96a49d23a4caebefcea66cfb855fadbae12ccf7c (patch)
tree41de30eaf2c89ade9a1e2a26b16ff588cda60649 /libcli/auth
parent36f7f985c168468a82a6e941c6e21c6113b906ca (diff)
downloadsamba-96a49d23a4caebefcea66cfb855fadbae12ccf7c.tar.gz
samba-96a49d23a4caebefcea66cfb855fadbae12ccf7c.tar.bz2
samba-96a49d23a4caebefcea66cfb855fadbae12ccf7c.zip
libcli: allow exclusion of netbios name in NTLMV2 blob
when no hostname is given, leave away the MsvAvNbComputerName part of the ntlmv2 blob Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'libcli/auth')
-rw-r--r--libcli/auth/smbencrypt.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index d090345bb8..366f6df3ad 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -385,11 +385,18 @@ DATA_BLOB NTLMv2_generate_names_blob(TALLOC_CTX *mem_ctx,
DATA_BLOB names_blob = data_blob_talloc(mem_ctx, NULL, 0);
/* Deliberately ignore return here.. */
- (void)msrpc_gen(mem_ctx, &names_blob,
- "aaa",
- MsvAvNbDomainName, domain,
- MsvAvNbComputerName, hostname,
- MsvAvEOL, "");
+ if (hostname != NULL) {
+ (void)msrpc_gen(mem_ctx, &names_blob,
+ "aaa",
+ MsvAvNbDomainName, domain,
+ MsvAvNbComputerName, hostname,
+ MsvAvEOL, "");
+ } else {
+ (void)msrpc_gen(mem_ctx, &names_blob,
+ "aa",
+ MsvAvNbDomainName, domain,
+ MsvAvEOL, "");
+ }
return names_blob;
}