aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/driver.c b/driver.c
index 15d2da9a..32f8c6fc 100644
--- a/driver.c
+++ b/driver.c
@@ -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 */
{