summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-08-22 21:41:50 +0000
committerJeremy Allison <jra@samba.org>2003-08-22 21:41:50 +0000
commit5dfeda00028c1d22428736a85140dec6f46ff94c (patch)
tree72a62a64eaa8b6d582e8df936db9f5d717ce7a07
parenteff91556a32fb932b6c753a14be8e3e8e52a0be5 (diff)
downloadsamba-5dfeda00028c1d22428736a85140dec6f46ff94c.tar.gz
samba-5dfeda00028c1d22428736a85140dec6f46ff94c.tar.bz2
samba-5dfeda00028c1d22428736a85140dec6f46ff94c.zip
Use correct size (17 not 16) when doing a push_ascii(). Ensure that
wins hook is called with unix charset. Jeremy. (This used to be commit ecb80573870103de7b3f332fb53bf6b952f25ee7)
-rw-r--r--source3/libsmb/nmblib.c2
-rw-r--r--source3/nmbd/nmbd_winsserver.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index b833a2f5df..23eac9ad7c 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -823,7 +823,7 @@ static int build_dgram(char *buf,struct packet_struct *p)
void make_nmb_name( struct nmb_name *n, const char *name, int type)
{
memset( (char *)n, '\0', sizeof(struct nmb_name) );
- push_ascii(n->name, name, 16, STR_TERMINATE|STR_UPPER);
+ push_ascii(n->name, name, sizeof(n->name), STR_TERMINATE|STR_UPPER);
n->name_type = (unsigned int)type & 0xFF;
StrnCpy( n->scope, global_scope(), 63 );
strupper_m( n->scope );
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index cd39dc5e21..784c909c81 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -120,7 +120,7 @@ static void wins_hook(const char *operation, struct name_record *namerec, int tt
p += slprintf(p, sizeof(command)-1, "%s %s %s %02x %d",
cmd,
operation,
- namerec->name.name,
+ nmb_namestr(&namerec->name),
namerec->name.name_type,
ttl);