From d51a91aeba01af72f324dffaa59123babee3ee18 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 9 Nov 2006 18:01:27 +0000 Subject: [PATCH] backport: make compat wrapper default to current user for imap login --- src/compat/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/compat/main.c b/src/compat/main.c index 69d3a51..6183a91 100644 --- a/src/compat/main.c +++ b/src/compat/main.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -167,6 +168,11 @@ main( int argc, char **argv ) /* defaults */ /* XXX the precedence is borked: it's defaults < cmdline < file instead of defaults < file < cmdline */ +#ifdef BSD + global.user = getenv( "USER" ); +#else + global.user = getenv( "LOGNAME" ); +#endif global.port = 143; global.box = "INBOX"; global.use_namespace = 1;