aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-01-17 23:05:49 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-01-17 23:05:49 +0000
commitdda3f5aab91553690f6cede95e45327b4c03e0bb (patch)
treea17e6c196736494e75aa347495fd56cbf88b0d11 /fetchmail.c
parentcbbb246b87bc8e4b3b72600c863c716266422d7a (diff)
downloadfetchmail-dda3f5aab91553690f6cede95e45327b4c03e0bb.tar.gz
fetchmail-dda3f5aab91553690f6cede95e45327b4c03e0bb.tar.bz2
fetchmail-dda3f5aab91553690f6cede95e45327b4c03e0bb.zip
Scott Burson's USER hack.
svn path=/trunk/; revision=1583
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 7f78eae6..506c11e7 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -645,19 +645,13 @@ static int load_params(int argc, char **argv, int optind)
exit(PS_SYNTAX);
}
- /* make sure delivery will default to a real local user */
+ /* if `user' doesn't name a real local user, try to run as root */
if ((pw = getpwnam(user)) == (struct passwd *)NULL)
- {
- fprintf(stderr,
- "fetchmail: can't set up default delivery to %s\n", user);
- exit(PS_SYNTAX); /* has to be from bad rc file */
- }
- else
- {
+ ctl->uid = 0;
+ else
ctl->uid = pw->pw_uid; /* for local delivery via MDA */
- if (!ctl->localnames) /* for local delivery via SMTP */
- save_str_pair(&ctl->localnames, user, NULL);
- }
+ if (!ctl->localnames) /* for local delivery via SMTP */
+ save_str_pair(&ctl->localnames, user, NULL);
#if !defined(HAVE_GETHOSTBYNAME) || !defined(HAVE_RES_SEARCH)
/* can't handle multidrop mailboxes unless we can do DNS lookups */