diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-10-27 04:23:23 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-10-27 04:23:23 +0000 |
commit | f4afe8b0b1fb6eda4684e68071d9c751b5642f38 (patch) | |
tree | 673ed4f7ab728e89b6f6fc8bce63823f7c318743 /driver.c | |
parent | eabdfb5e1ebf83147017c57db3659e7b2e8ecad1 (diff) | |
download | fetchmail-f4afe8b0b1fb6eda4684e68071d9c751b5642f38.tar.gz fetchmail-f4afe8b0b1fb6eda4684e68071d9c751b5642f38.tar.bz2 fetchmail-f4afe8b0b1fb6eda4684e68071d9c751b5642f38.zip |
Fix core dump bug in default-user logic.
svn path=/trunk/; revision=397
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -546,20 +546,20 @@ struct query *ctl; /* query control record */ find_server_names(tohdr, ctl, &xmit_names); find_server_names(cchdr, ctl, &xmit_names); find_server_names(bcchdr, ctl, &xmit_names); - - /* if nothing supplied localnames, default appropriately */ - if (!xmit_names) - save_uid(&xmit_names, -1, dfltuser); } else /* it's a single-drop box, use first localname */ #endif /* HAVE_GETHOSTBYNAME */ { if (ctl->localnames) save_uid(&xmit_names, -1, ctl->localnames->id); - else - save_uid(&xmit_names, -1, dfltuser); } + /* if nothing supplied localnames, default appropriately */ + if (getuid() == 0) + save_uid(&xmit_names, -1, ctl->remotename); + else + save_uid(&xmit_names, -1, user); + /* time to address the message */ if (ctl->mda[0]) /* we have a declared MDA */ { |