summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-11 07:54:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:42 -0500
commitdd689afdc807b9ff057ee7e917e12b6597fe319c (patch)
tree6a3249cbe4834ccbe29973d07abbf5fa8f5ad7e9 /source4/utils
parentf3d1fa124bafde1842c09fa6d408a52f99b5d984 (diff)
downloadsamba-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/utils')
-rw-r--r--source4/utils/nmblookup.c8
1 files changed, 8 insertions, 0 deletions
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 <name> 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 }
};