[patch] HEAD winbindd_cm.c mutex bug
Martin Pool
mbp at samba.org
Wed Jan 15 05:45:01 GMT 2003
On 10 Jan 2003, Andrew Bartlett <abartlet at samba.org> wrote:
> I think that the connection mutex should be sorted out in
> cli_full_connection(), rather than in individual apps. Then we can grab
> the mutex for netlogon when operating on that pipe, but I really think
> that end should be separate.
Yes, it seems to me that it would be cleaner to do this at a lower
level rather than inside winbindd.
However, for the present do you or jra want to commit this patch? It
does keep it relatively in sync with appliance_head, which I know is
important to jra.
Index: winbindd_cm.c
===================================================================
RCS file: /data/cvs/samba/source/nsswitch/winbindd_cm.c,v
retrieving revision 1.59
diff -u -u -p -r1.59 winbindd_cm.c
--- winbindd_cm.c 12 Dec 2002 23:35:55 -0000 1.59
+++ winbindd_cm.c 15 Jan 2003 05:42:28 -0000
@@ -369,9 +369,11 @@ static NTSTATUS cm_open_connection(const
new_conn->controller, global_myname(), ipc_domain, ipc_username));
for (i = 0; retry && (i < 3); i++) {
-
if (!secrets_named_mutex(new_conn->controller, 10)) {
DEBUG(0,("cm_open_connection: mutex grab failed for %s\n", new_conn->controller));
+ /* try again, but if we never succeed in getting a connection then this
+ * is the result */
+ result = NT_STATUS_NO_LOGON_SERVERS;
continue;
}
--
Martin
More information about the samba-technical
mailing list