From 6985da584857b30a34dd1bc2d4792ed0e5b0b1dc Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 9 Nov 2006 17:57:38 +0000 Subject: [PATCH] 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 593d5ef..faeaadc 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;