Replaced the contents of the function 'get_smbpwnam' with routines which access NetInfo. If no user is found and the sambapasswd file is something other than 'netinfo', then that file will be checked.
Rewrote the smbpasswd program to access and modify the NetInfo database (source in 'netinfo/smbpasswd.c').
Printers:
=========
In the file pcap.c:
The function 'pcap_printer_fn' was replaced. It scans the NetInfo hierarchy for printers visible on the network. Only printers with a 'netbios name' property (with the name as the value) are chosen. If a printcap file name other than 'netinfo' is supplied, this file will be parsed after scanning NetInfo.
The function 'pcap_printername_ok' was replaced. It scans the NetInfo heriarchy for printers with a 'netbios name' property. If a matching one is found, the name and the status true is returned. If no printer is found in NetInfo and if a printcap file name other than 'netinfo' is supplied, this file will be parsed after scanning NetInfo.
Configuration:
==============
In params.c:
The function 'pm_process' opens and parses the configuration file. It was replaced and renamed to pm_file_process.
The function 'enumerate_sections' is the one which will parse a section and initialize it, calling 'enumerate_parameters' for all parameters. It was be replaced by 'ni_enumerate_sections'.
The function 'enumerate_parameters' is the one which will parse a parameter and set the value found. It was be replaced by 'ni_enumerate_parameters'.
The new routines will scan the NetInfo hierarchy from the topmost level down to the lowest level and update all values found, possibly overwriting any values set on a previous level. If no entries in NetInfo are found, the original scanner will be called with the filename passed to pm_process.
Netbios host names (for the lan manager):
=========================================
In nmbd.c:
Replaced the function 'load_hosts_file'. Added an option -V for use with the SambaManager. It simply outputs the string 'NetInfo based netbios nameserver version ...' and then exits.
In 'load_param.c':
Patched 'init_globals' to search for a netbios name in the host's NetInfo entry and set 'myname' to this value. (Utility routine in utils.c.)
NetInfo routines and other modifications:
=========================================
Modified the routine file_exist in utils.c. If the file called is netinfo, return true.
Moved the netinfo.c routines to the endo of the 'utils.c' file and guarded them with
#ifdef USE_NETINFO
...
#endif
The prototypes are at the end of 'proto.h' and are also guarded.
Updated includes.h to include the appropriate netinfo headers.