dovecot: Trying to user $USER environment didn't work before env...

dovecot at dovecot.org dovecot at dovecot.org
Fri Feb 29 11:18:16 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/e4aa76ca2bc5
changeset: 7305:e4aa76ca2bc5
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Feb 29 11:21:07 2008 +0200
description:
Trying to user $USER environment didn't work before environment was already
cleared. Get it earlier.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/deliver/deliver.c |    2 +-

diffs (19 lines):

diff -r 1d79c534b54b -r e4aa76ca2bc5 src/deliver/deliver.c
--- a/src/deliver/deliver.c	Fri Feb 29 11:14:45 2008 +0200
+++ b/src/deliver/deliver.c	Fri Feb 29 11:21:07 2008 +0200
@@ -796,6 +796,7 @@ int main(int argc, char *argv[])
 		}
 	}
 
+	user = getenv("USER");
 	if (!keep_environment)
 		deliver_env_clean();
 
@@ -806,7 +807,6 @@ int main(int argc, char *argv[])
 		/* we're non-root. get our username and possibly our home. */
 		struct passwd *pw;
 
-		user = getenv("USER");
 		home = getenv("HOME");
 		if (user != NULL && home != NULL) {
 			/* no need for a pw lookup */


More information about the dovecot-cvs mailing list