[dovecot-cvs] dovecot/src/login client-authenticate.c,1.13,1.14 master.c,1.2,1.3 master.h,1.2,1.3

cras at procontrol.fi cras at procontrol.fi
Wed Nov 6 16:20:53 EET 2002


Update of /home/cvs/dovecot/src/login
In directory danu:/tmp/cvs-serv6413/src/login

Modified Files:
	client-authenticate.c master.c master.h 
Log Message:
Added verbose_proctitle setting: Show more verbose process titles (in ps).
Currently shows user name and IP address. Useful for seeing who are actually
using the IMAP processes (eg. shared mailboxes or if same uid is used for
multiple accounts).



Index: client-authenticate.c
===================================================================
RCS file: /home/cvs/dovecot/src/login/client-authenticate.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- client-authenticate.c	6 Nov 2002 06:26:35 -0000	1.13
+++ client-authenticate.c	6 Nov 2002 14:20:50 -0000	1.14
@@ -135,7 +135,8 @@
 		client->auth_request = NULL;
 
 		master_request_imap(client->fd, auth_process, client->tag,
-				    request->cookie, master_callback, client);
+				    request->cookie, &client->ip,
+				    master_callback, client);
 
 		/* disable IO until we're back from master */
 		if (client->io != NULL) {

Index: master.c
===================================================================
RCS file: /home/cvs/dovecot/src/login/master.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- master.c	22 Aug 2002 12:48:38 -0000	1.2
+++ master.c	6 Nov 2002 14:20:50 -0000	1.3
@@ -61,7 +61,7 @@
 }
 
 void master_request_imap(int fd, int auth_process, const char *login_tag,
-			 unsigned char cookie[AUTH_COOKIE_SIZE],
+			 unsigned char cookie[AUTH_COOKIE_SIZE], IPADDR *ip,
 			 MasterCallback callback, void *context)
 {
 	MasterRequest req;
@@ -71,6 +71,7 @@
 	memset(&req, 0, sizeof(req));
 	req.id = fd;
 	req.auth_process = auth_process;
+	memcpy(&req.ip, ip, sizeof(IPADDR));
 	memcpy(req.cookie, cookie, AUTH_COOKIE_SIZE);
 
 	if (strlen(login_tag) >= sizeof(req.login_tag))

Index: master.h
===================================================================
RCS file: /home/cvs/dovecot/src/login/master.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- master.h	22 Aug 2002 12:48:38 -0000	1.2
+++ master.h	6 Nov 2002 14:20:50 -0000	1.3
@@ -6,8 +6,8 @@
 typedef void (*MasterCallback)(MasterReplyResult result, void *context);
 
 /* Request IMAP process for given cookie. */
-void master_request_imap(int fd, int auth_process, const char *login_tag,
-			 unsigned char cookie[AUTH_COOKIE_SIZE],
+void master_request_imap(int fd, int auth_process,  const char *login_tag,
+			 unsigned char cookie[AUTH_COOKIE_SIZE], IPADDR *ip,
 			 MasterCallback callback, void *context);
 
 void master_init(void);




More information about the dovecot-cvs mailing list