>Apply some NULL pointer paranoia to previous wins hook fix.
>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
12659ae74965f8a088361cb4fbf8730cdad84af1)
{
pstring command;
char *cmd = lp_wins_hook();
- char *p;
+ char *p, *namestr;
int i;
if (!cmd || !*cmd) return;
}
}
+ /* Use the name without the nametype (and scope) appended */
+
+ namestr = nmb_namestr(&namerec->name);
+ if ((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);