Bug 528 - wins hook doesn't work
Summary: wins hook doesn't work
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: nmbd (show other bugs)
Version: 3.0.0
Hardware: Other Linux
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact:
URL:
Keywords:
: 766 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-27 18:21 UTC by Rod Smith
Modified: 2005-08-24 10:24 UTC (History)
1 user (show)

See Also:


Attachments
Fix wins hook operation in 3.0.0 (882 bytes, patch)
2003-09-28 21:42 UTC, Tim Potter
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rod Smith 2003-09-27 18:21:45 UTC
The "wins hook" parameter doesn't seem to work with Samba 3.0.0. When I set 
"wins hook = /usr/local/bin/test_prg", the test_prg script (a bash script) is 
not called when a new system comes online. This DOES work with Samba 2.2.8a.
Comment 1 Tim Potter 2003-09-28 18:39:36 UTC
What happens at debug level 10?  I just set up a shell script at debug level 10
and get the following output:

find_name_on_subnet: on subnet WINS_SERVER_SUBNET - found name ERIS<20> source=1
is_myname("ERIS") returns 1
calling wins hook for ERIS<20>
sh: -c: line 1: syntax error near unexpected token `20'
sh: -c: line 1: `/home/tpot/work/systems/eris/winshook.sh refresh ERIS<20> 20
259200 192.168.1.130 172.16.118.1'

We should be escaping the < and > characters before calling system().  I wonder
how this worked under 2.2.8?
Comment 2 Tim Potter 2003-09-28 21:21:56 UTC
OK I've run up a samba 2.2.28 system and the bug is that the name should
definitely not include the nametype in angle brackets as it appears as the next
parameter!

This will be in 3.0.1.
Comment 3 Tim Potter 2003-09-28 21:42:56 UTC
Created attachment 169 [details]
Fix wins hook operation in 3.0.0

I've committed a fix to CVS and will be available in Samba 3.0.1.  In the
meantime you might like to apply the patch above.
Comment 4 Tim Potter 2003-09-28 21:43:22 UTC
Marking as fixed.
Comment 5 Tim Potter 2003-11-20 22:12:46 UTC
*** Bug 766 has been marked as a duplicate of this bug. ***
Comment 6 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:24:30 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.