summaryrefslogtreecommitdiffstats
path: root/source/nmbd/nmbd_winsserver.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-09-29 04:41:45 +0000
committerTim Potter <tpot@samba.org>2003-09-29 04:41:45 +0000
commit92b37b3ef097e84adace1295af42853c07ddbec2 (patch)
treed5945f03fe29f299b1f2239ff943c3de82f181bd /source/nmbd/nmbd_winsserver.c
parent2690c185f01b8fb4307dc803fb90c00400f2da69 (diff)
downloadsamba-92b37b3ef097e84adace1295af42853c07ddbec2.tar.gz
samba-92b37b3ef097e84adace1295af42853c07ddbec2.tar.xz
samba-92b37b3ef097e84adace1295af42853c07ddbec2.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.
Diffstat (limited to 'source/nmbd/nmbd_winsserver.c')
-rw-r--r--source/nmbd/nmbd_winsserver.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/nmbd/nmbd_winsserver.c b/source/nmbd/nmbd_winsserver.c
index 484588c6626..804a5aad57b 100644
--- a/source/nmbd/nmbd_winsserver.c
+++ b/source/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);