diff options
author | Tim Potter <tpot@samba.org> | 2003-09-29 04:41:45 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-09-29 04:41:45 +0000 |
commit | 1148875a1586ee232f40422ba776af71594c70fb (patch) | |
tree | 7b731a121fb76b82bb6ce40bda242b5ce5adde2c /source3/nmbd | |
parent | cda8fc29152016c10e2a481b8ba57fc1aad8af7d (diff) | |
download | samba-1148875a1586ee232f40422ba776af71594c70fb.tar.gz samba-1148875a1586ee232f40422ba776af71594c70fb.tar.bz2 samba-1148875a1586ee232f40422ba776af71594c70fb.zip |
Fix broken wins hook functionality. A i18n fixe caused the name type
to be appended to the netbios name between angle brackets. This interfered
the 'sh -c' used to implement smbrun(). Closes bug #528.
(This used to be commit 92b37b3ef097e84adace1295af42853c07ddbec2)
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index 484588c662..804a5aad57 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -107,7 +107,7 @@ static void wins_hook(const char *operation, struct name_record *namerec, int tt { pstring command; char *cmd = lp_wins_hook(); - char *p; + char *p, *namestr; int i; if (!cmd || !*cmd) return; @@ -119,11 +119,17 @@ static void wins_hook(const char *operation, struct name_record *namerec, int tt } } + /* Use the name without the nametype (and scope) appended */ + + namestr = nmb_namestr(&namerec->name); + p = strchr(namestr, '<'); + *p = 0; + p = command; p += slprintf(p, sizeof(command)-1, "%s %s %s %02x %d", cmd, operation, - nmb_namestr(&namerec->name), + namestr, namerec->name.name_type, ttl); |