From cecf0f21e15126db3afaeca4baf608b1bf413a10 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 7 May 1992 20:13:17 +0000 Subject: *** empty log message *** --- lib-src/movemail.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib-src/movemail.c') diff --git a/lib-src/movemail.c b/lib-src/movemail.c index de766e6d609..271346a86a8 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -392,6 +392,7 @@ xmalloc (size) #include #include #include +#include #ifdef USG #include @@ -427,6 +428,9 @@ popmail (user, outfile) register int i; int mbfi; FILE *mbf; + struct passwd *pw = (struct passwd *) getpwuid (getuid ()); + if (pw == NULL) + fatal ("cannot determine user name"); host = getenv ("MAILHOST"); if (host == NULL) @@ -445,7 +449,7 @@ popmail (user, outfile) } if (pop_command ("USER %s", user) == NOTOK - || pop_command ("RPOP %s", user) == NOTOK) + || pop_command ("RPOP %s", pw->pw_name) == NOTOK) { pop_command ("QUIT"); fatal (Errmsg); -- cgit v1.2.3