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/utils/nmblookup.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/utils') diff --git a/source4/utils/nmblookup.c b/source4/utils/nmblookup.c index 5e8b59edc8..857d03fe19 100644 --- a/source4/utils/nmblookup.c +++ b/source4/utils/nmblookup.c @@ -38,6 +38,7 @@ static struct { BOOL node_status; BOOL root_port; BOOL lookup_by_ip; + BOOL case_sensitive; } options; /* @@ -178,6 +179,10 @@ static void process_one(const char *name) char *node_name, *p; struct nbt_name_socket *nbtsock; NTSTATUS status; + + if (!options.case_sensitive) { + name = strupper_talloc(tmp_ctx, name); + } if (options.find_master) { node_type = NBT_NAME_MASTER; @@ -259,6 +264,9 @@ int main(int argc,char *argv[]) { "lookup-by-ip", 'A', POPT_ARG_VAL, &options.lookup_by_ip, True, "Do a node status on as an IP Address" }, + { "case-sensitive", 0, POPT_ARG_VAL, &options.case_sensitive, + True, "Don't uppercase the name before sending" }, + POPT_COMMON_SAMBA { 0, 0, 0, 0 } }; -- cgit