Hi all ! I'm currently developping a program that takes the smbtree output, parse it, retrieve all connected workstations, then call nmblookup for each workstation, resolve the IP, create a BIND zone file with this. At this point, the programs works; I use system( " ") calls and unsafe temporairy files. I just wanted to get it up quickly Now; to secure this programs; I tought about 2 things -> secure the program using pipes However; I would have to make an update at each samba release since there's no way to guarante that the smbtree and nmblookup arguments and output will be the exact same file format as the current one -> Link my code to samba. I would take the smbtree code; just rename the main function smbtreemain and do the same for nmblookup and use internal variables to handle it. However, I'm not shure this code would even build in future release because of linkage to librairies and so... Which way do you recommand ? Any other suggestions ? Thanks a lot !
Adam Tauno Williams
2004-Dec-08 04:32 UTC
[SAMBA] samba - bind : program guideline suggestion
> I'm currently developping a program that takes the smbtree output, parse it, > retrieve all connected workstations, then call nmblookup for each > workstation, resolve the IP, create a BIND zone file with this.Why not use "wins hook"?> Now; to secure this programs; I tought about 2 things > -> secure the program using pipes > However; I would have to make an update at each samba release since > there's no way to guarante that the smbtree and nmblookup arguments and > output will be the exact same file format as the current oneHave you checked out the python bindings (included on most distros now i think) if the hook scripts are not sufficient?