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 | b4cbe32d8978b81d7867f2c7cd8cc3cc30222015 (patch) | |
tree | eccd84f3234904894e8191494be6110caf662428 /lib-src | |
parent | 742cfeaaa8fa068b7d8fe0e3826169edee15ec1a (diff) | |
download | emacs-b4cbe32d8978b81d7867f2c7cd8cc3cc30222015.tar.gz |
*** empty log message ***
Diffstat (limited to 'lib-src')
-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); |