aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-14 16:28:52 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-14 16:28:52 +0000
commite72ec8a0b777fdcc929919e28f1b0893a85271b5 (patch)
tree7be47972f93d45dffa6f8084d99563be69d2b89a /fetchmail.c
parent32b10e9e33c10dd3223fde2541bbfea0852c2af5 (diff)
downloadfetchmail-e72ec8a0b777fdcc929919e28f1b0893a85271b5.tar.gz
fetchmail-e72ec8a0b777fdcc929919e28f1b0893a85271b5.tar.bz2
fetchmail-e72ec8a0b777fdcc929919e28f1b0893a85271b5.zip
Added `to' keyword, changed local-user default.
svn path=/trunk/; revision=331
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fetchmail.c b/fetchmail.c
index b3a8046a..4257562c 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -193,7 +193,10 @@ char **argv;
/* if rc file didn't supply a localname, default appropriately */
if (!hostp->localname[0])
- strcpy(hostp->localname, user);
+ if (getuid() == 0)
+ strcpy(hostp->localname, hostp->remotename);
+ else
+ strcpy(hostp->localname, user);
/* check that delivery is going to a real local user */
if ((pw = getpwnam(user)) == (struct passwd *)NULL)