diff options
author | Jeremy Allison <jra@samba.org> | 2003-08-22 00:26:37 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-08-22 00:26:37 +0000 |
commit | 647a048ad085c74ebbddb1957b690f3cb9ced178 (patch) | |
tree | f0a42b1f29daa7c00fff3bcd20a87034f6b383c6 /source3 | |
parent | e88593f1c0fe330e4b2c3a3e15f5763d77604bb6 (diff) | |
download | samba-647a048ad085c74ebbddb1957b690f3cb9ced178.tar.gz samba-647a048ad085c74ebbddb1957b690f3cb9ced178.tar.bz2 samba-647a048ad085c74ebbddb1957b690f3cb9ced178.zip |
Ensure nmb_namestr() converts back from CH_DOS to CH_UNIX.
Jeremy.
(This used to be commit eb792727437c74417f5ef7614b300ab84f06fdaf)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/nmblib.c | 29 | ||||
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 8 |
2 files changed, 16 insertions, 21 deletions
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c index 6ee05f0104..b833a2f5df 100644 --- a/source3/libsmb/nmblib.c +++ b/source3/libsmb/nmblib.c @@ -310,21 +310,24 @@ static int put_nmb_name(char *buf,int offset,struct nmb_name *name) } /******************************************************************* - useful for debugging messages - ******************************************************************/ + Useful for debugging messages. +******************************************************************/ + char *nmb_namestr(struct nmb_name *n) { - static int i=0; - static fstring ret[4]; - char *p = ret[i]; - - if (!n->scope[0]) - slprintf(p,sizeof(fstring)-1, "%s<%02x>",n->name,n->name_type); - else - slprintf(p,sizeof(fstring)-1, "%s<%02x>.%s",n->name,n->name_type,n->scope); - - i = (i+1)%4; - return(p); + static int i=0; + static fstring ret[4]; + fstring name; + char *p = ret[i]; + + pull_ascii_fstring(name, n->name); + if (!n->scope[0]) + slprintf(p,sizeof(fstring)-1, "%s<%02x>",name,n->name_type); + else + slprintf(p,sizeof(fstring)-1, "%s<%02x>.%s",name,n->name_type,n->scope); + + i = (i+1)%4; + return(p); } /******************************************************************* diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index eafff03b76..cd39dc5e21 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -2050,11 +2050,3 @@ void nmbd_wins_new_entry(int msg_type, pid_t src, void *buf, size_t len) } } - - - - - - - - |