diff options
author | Richard M. Stallman <rms@gnu.org> | 1992-05-07 20:13:17 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1992-05-07 20:13:17 +0000 |
commit | cecf0f21e15126db3afaeca4baf608b1bf413a10 (patch) | |
tree | 0c99f53209c3cfa7775898d586f3fc28000ffdd1 | |
parent | bc98c79cb71b16f5f1a934927d41c9af9ccb2d62 (diff) | |
download | emacs-cecf0f21e15126db3afaeca4baf608b1bf413a10.tar.gz |
*** empty log message ***
-rw-r--r-- | lib-src/movemail.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 <netinet/in.h> #include <netdb.h> #include <stdio.h> +#include <pwd.h> #ifdef USG #include <fcntl.h> @@ -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); |