Winbind configuration recovery after SIGHUP

Nimrod Sapir NIMRODS at il.ibm.com
Wed Jun 19 08:38:50 MDT 2013


Hello

While working with Samba 4.0, I've noticed an issue regarding the idmap 
configuration re-read when Winbind receives a SIGHUP or when the 
smbcontrol reload-config command is used. I believe this is also relevant 
for Samba 3.6. What I've seen is that when Samba idmap configuration is 
changed, and SIGHUP is called, the idmap information becomes corrupted. 
For example, in my case, I changed the default domain configuration and 
called "killall -HUP winbindd". It seems that the old pointer used in 
idmap.c for the default domain were not reset, and therefore now pointed 
to the wrong configuration entries.

The solution I have is to call idmap_close() when handling SIGHUP or 
reload-config command. The result is that all domain information is 
removed. Later on, the passdb/default/named domains information is 
recreated, using the updated configuration, when required (as would have 
happened on the first time this domain is used during winbind startup 
flow).

 Attached is a patch I created (based on the v4-0-stable branch) - do you 
think this is a good enough solution for the problem?



Thanks!
Nimrod Sapir
IBM - XIV, Israel
NAS Development Team
Office: +972-3-689-7763
Cell:   +972-54-7726-320
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1338 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130619/2f18c12b/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixing-winbind-idmap-config-recovery-issue-on-SIGHUP.patch
Type: application/octet-stream
Size: 1285 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130619/2f18c12b/attachment.obj>


More information about the samba-technical mailing list