[dovecot-cvs] dovecot/src/master mail-process.c,1.77,1.78

cras at dovecot.org cras at dovecot.org
Fri Oct 28 14:27:48 EEST 2005


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv23285/src/master

Modified Files:
	mail-process.c 
Log Message:
Added %i for UID



Index: mail-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- mail-process.c	1 Oct 2005 09:48:11 -0000	1.77
+++ mail-process.c	28 Oct 2005 11:27:46 -0000	1.78
@@ -82,7 +82,8 @@
 static const struct var_expand_table *
 get_var_expand_table(const char *protocol,
 		     const char *user, const char *home,
-		     const char *local_ip, const char *remote_ip, pid_t pid)
+		     const char *local_ip, const char *remote_ip,
+		     pid_t pid, uid_t uid)
 {
 	static struct var_expand_table static_tab[] = {
 		{ 'u', NULL },
@@ -93,6 +94,7 @@
 		{ 'l', NULL },
 		{ 'r', NULL },
 		{ 'p', NULL },
+		{ 'i', NULL },
 		{ '\0', NULL }
 	};
 	struct var_expand_table *tab;
@@ -109,6 +111,7 @@
 	tab[5].value = local_ip;
 	tab[6].value = remote_ip;
 	tab[7].value = dec2str(pid);
+	tab[8].value = dec2str(uid);
 
 	return tab;
 }
@@ -291,7 +294,8 @@
 	var_expand_table =
 		get_var_expand_table(protocol, getenv("USER"), getenv("HOME"),
 				     getenv("TCPLOCALIP"),
-				     getenv("TCPREMOTEIP"), getpid());
+				     getenv("TCPREMOTEIP"),
+				     getpid(), geteuid());
 
 	mail_process_set_environment(set, getenv("MAIL"), var_expand_table);
         client_process_exec(set->mail_executable, "");
@@ -387,7 +391,7 @@
 				     user, home_dir,
 				     net_ip2addr(local_ip),
 				     net_ip2addr(remote_ip),
-				     pid != 0 ? pid : getpid());
+				     pid != 0 ? pid : getpid(), uid);
 	str = t_str_new(128);
 
 	if (pid != 0) {



More information about the dovecot-cvs mailing list