wins.dat manipulation

Andrew Bartlett abartlet at samba.org
Tue Mar 23 23:07:23 GMT 2004


On Tue, 2004-03-23 at 22:58, Dmitry Melekhov wrote:
> Hello!
> 
> I need to edit wins.dat without restarting nmbd, so I wrote very little 
> patch to smbcontrol which add two messages:
>        dump-wins                     Dump wins database
>         load-wins                     Load wins database
> 
> 
> They are handled by
> 
> void nmbd_message_winsload(int msg_type, pid_t src, void *buf, size_t len)
> {
>   initialise_wins();
> }
> 
> void nmbd_message_winsdump(int msg_type, pid_t src, void *buf, size_t len)
> {
>   wins_write_database(True);
> }
> 
> 
> Is this correct or I broke something?

It is racy - what happens if some machine registers while you are
editing?

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20040324/6a3c72d6/attachment.bin


More information about the samba-technical mailing list