diff options
| author | Scott Long <scottl@FreeBSD.org> | 2020-11-15 20:24:59 +0000 |
|---|---|---|
| committer | Scott Long <scottl@FreeBSD.org> | 2020-11-15 20:24:59 +0000 |
| commit | 8e1031086d40b9bd3fa255d92cc45573e3afed16 (patch) | |
| tree | e3cb8206851bd27dac89f9e7d562fe4c364931d2 /usr.sbin/mailwrapper | |
| parent | fc7cf7241f89a3d3ccc20cb49c5bf61e154b7a1b (diff) | |
Notes
Diffstat (limited to 'usr.sbin/mailwrapper')
| -rw-r--r-- | usr.sbin/mailwrapper/mailwrapper.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/mailwrapper/mailwrapper.c b/usr.sbin/mailwrapper/mailwrapper.c index 9c92af02533a..8a9ec220a26b 100644 --- a/usr.sbin/mailwrapper/mailwrapper.c +++ b/usr.sbin/mailwrapper/mailwrapper.c @@ -105,10 +105,8 @@ main(int argc, char *argv[], char *envp[]) initarg(&al); addarg(&al, argv[0]); - if ((len = getlocalbase(localmailerconf, MAXPATHLEN)) <= 0) - err(EX_OSERR, "cannot determine local path"); - - strlcat(localmailerconf, "/etc/mail/mailer.conf", MAXPATHLEN); + snprintf(localmailerconf, MAXPATHLEN, "%s/etc/mail/mailer.conf", + getenv("LOCALBASE") ? getenv("LOCALBASE") : _PATH_LOCALBASE); mailerconf = localmailerconf; if ((config = fopen(localmailerconf, "r")) == NULL) |
