svn commit: samba r23085 - in
branches/SAMBA_3_0_26/source/nsswitch: .
obnox at samba.org
obnox at samba.org
Tue May 22 22:00:18 GMT 2007
Author: obnox
Date: 2007-05-22 22:00:16 +0000 (Tue, 22 May 2007)
New Revision: 23085
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23085
Log:
Activate the winbindd validation code in 3_0_26, too.
Original comment of the 3_0 checkin (r23040):
Activate the winbindd cache validation code in the
winbindd main function.
I have tested and somewhat extended the code, and it seems
to do a good job. I have possibly not caught all error
conditions though.
Michael
Modified:
branches/SAMBA_3_0_26/source/nsswitch/winbindd.c
Changeset:
Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd.c 2007-05-22 21:53:54 UTC (rev 23084)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd.c 2007-05-22 22:00:16 UTC (rev 23085)
@@ -1065,6 +1065,20 @@
pidfile_create("winbindd");
+ /* Ensure all cache and idmap caches are consistent
+ before we startup. */
+
+ if (winbindd_validate_cache()) {
+ /* We have a bad cache, but luckily we
+ just deleted it. Restart ourselves */
+ int i;
+ /* Ensure we have no open low fd's. */
+ for (i = 3; i < 100; i++) {
+ close(i);
+ }
+ return execve(argv[0], argv, envp);
+ }
+
#if HAVE_SETPGID
/*
* If we're interactive we want to set our own process group for
More information about the samba-cvs
mailing list