[PATCH] s3: log client flags for idle state in winbindd

Pierre Carrier pcarrier at redhat.com
Wed Sep 29 04:26:25 MDT 2010


Include client flags to explain their active/idle state in the logs,
whether (SIGUSR2 is received, DEBUGLEVEL >= 5) or we couldn't find any idle client.
---
 source3/winbindd/winbindd.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 9c0a1fb..5e7a507 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -99,6 +99,10 @@ static void winbindd_status(void)
 			DEBUGADD(2, ("\t\tpid %lu, sock %d (%s)\n",
 				     (unsigned long)tmp->pid, tmp->sock,
 				     client_is_idle(tmp) ? "idle" : "active"));
+			DEBUGADD(5, ("\t\t\t%s%s%s\n",
+				     tmp->response ? "r":"",
+				     tmp->pwent_state ? "p":"",
+				     tmp->grent_state ? "g":""));
 		}
 	}
 }
@@ -917,6 +921,8 @@ static void winbindd_listen_fde_handler(struct tevent_context *ev,
 				 "client connections, no idle "
 				 "connection found\n",
 				 lp_winbind_max_clients()));
+			if(DEBUGLEVEL > 2)
+				winbindd_status();
 			break;
 		}
 	}
-- 
1.7.3



More information about the samba-technical mailing list