diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-02-11 07:54:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:42 -0500 |
commit | dd689afdc807b9ff057ee7e917e12b6597fe319c (patch) | |
tree | 6a3249cbe4834ccbe29973d07abbf5fa8f5ad7e9 /source4/libcli/nbt | |
parent | f3d1fa124bafde1842c09fa6d408a52f99b5d984 (diff) | |
download | samba-dd689afdc807b9ff057ee7e917e12b6597fe319c.tar.gz samba-dd689afdc807b9ff057ee7e917e12b6597fe319c.tar.bz2 samba-dd689afdc807b9ff057ee7e917e12b6597fe319c.zip |
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)
Diffstat (limited to 'source4/libcli/nbt')
-rw-r--r-- | source4/libcli/nbt/nbtname.c | 10 |
1 files changed, 4 insertions, 6 deletions
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 */ |