git.samba.org
/
garming
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f13043
)
r21593: give a more useful error, when we can't resolve a long name
author
Stefan Metzmacher
<metze@samba.org>
Wed, 28 Feb 2007 17:25:29 +0000
(17:25 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 19:49:02 +0000
(14:49 -0500)
via broadcast of wins
metze
(This used to be commit
49591d699653e48f2e9540359e5b4ae97786511c
)
source4/libcli/resolve/nbtlist.c
patch
|
blob
|
history
diff --git
a/source4/libcli/resolve/nbtlist.c
b/source4/libcli/resolve/nbtlist.c
index 58433d0a702c6ba6e552d3703da3b2f28d007a76..e8ea22a0dce80378cee68533c0b5d06b9141a9f8 100644
(file)
--- a/
source4/libcli/resolve/nbtlist.c
+++ b/
source4/libcli/resolve/nbtlist.c
@@
-126,6
+126,15
@@
struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx,
if (composite_nomem(state->name.scope, c)) return c;
}
+ /*
+ * we can't push long names on the wire,
+ * so bail out here to give a useful error message
+ */
+ if (strlen(state->name.name) > 15) {
+ composite_error(c, NT_STATUS_OBJECT_NAME_NOT_FOUND);
+ return c;
+ }
+
state->nbtsock = nbt_name_socket_init(state, event_ctx);
if (composite_nomem(state->nbtsock, c)) return c;