From dd689afdc807b9ff057ee7e917e12b6597fe319c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Feb 2005 07:54:20 +0000 Subject: r5328: - allow case sensitive nbt name lookups - added --case-sensitive option to nmblookup - added case sensitivity tests to the NBT-WINS test (This used to be commit 80a95d5688e055b36727e5c043cb36322d719763) --- source4/libcli/nbt/nbtname.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source4/libcli/nbt') diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c index 1904b33a9b..0d2840e0b5 100644 --- a/source4/libcli/nbt/nbtname.c +++ b/source4/libcli/nbt/nbtname.c @@ -114,7 +114,7 @@ static NTSTATUS decompress_name(char *name, enum nbt_name_type *type) compress a name component */ static uint8_t *compress_name(TALLOC_CTX *mem_ctx, - uint8_t *name, enum nbt_name_type type) + const uint8_t *name, enum nbt_name_type type) { uint8_t *cname; int i; @@ -211,7 +211,7 @@ NTSTATUS ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, struct nbt_name { uint_t num_components; uint8_t *components[MAX_COMPONENTS]; - char *dname, *dscope=NULL, *p; + char *dscope=NULL, *p; uint8_t *cname; int i; @@ -219,14 +219,12 @@ NTSTATUS ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, struct nbt_name return NT_STATUS_OK; } - dname = strupper_talloc(ndr, r->name); - NT_STATUS_HAVE_NO_MEMORY(dname); if (r->scope) { - dscope = strupper_talloc(ndr, r->scope); + dscope = talloc_strdup(ndr, r->scope); NT_STATUS_HAVE_NO_MEMORY(dscope); } - cname = compress_name(ndr, dname, r->type); + cname = compress_name(ndr, r->name, r->type); NT_STATUS_HAVE_NO_MEMORY(cname); /* form the base components */ -- cgit