diff options
| author | 2000-01-10 05:34:32 +0000 | |
|---|---|---|
| committer | 2000-01-10 05:34:32 +0000 | |
| commit | 4ddf7c6b23fc05947332ce6146136d43b30923bf (patch) | |
| tree | b22052117bee88e394667a696068b3c56f4893c4 /usr.sbin/mailwrapper/mailwrapper.c | |
| parent | Remove unnecessary function prototype. (diff) | |
| download | wireguard-openbsd-4ddf7c6b23fc05947332ce6146136d43b30923bf.tar.xz wireguard-openbsd-4ddf7c6b23fc05947332ce6146136d43b30923bf.zip | |
Place NULL arg on end of argv array only after all other args. mickey@ ok
Diffstat (limited to 'usr.sbin/mailwrapper/mailwrapper.c')
| -rw-r--r-- | usr.sbin/mailwrapper/mailwrapper.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/mailwrapper/mailwrapper.c b/usr.sbin/mailwrapper/mailwrapper.c index 37fb171e987..762494dfdc2 100644 --- a/usr.sbin/mailwrapper/mailwrapper.c +++ b/usr.sbin/mailwrapper/mailwrapper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mailwrapper.c,v 1.7 2000/01/10 02:46:56 deraadt Exp $ */ +/* $OpenBSD: mailwrapper.c,v 1.8 2000/01/10 05:34:32 imp Exp $ */ /* $NetBSD: mailwrapper.c,v 1.2 1999/02/20 22:10:07 thorpej Exp $ */ /* @@ -121,9 +121,8 @@ main(argc, argv, envp) for (len = 0; len < argc; len++) addarg(&al, argv[len], 0); - addarg(&al, NULL, 0); - if ((config = fopen(_PATH_MAILERCONF, "r")) == NULL) { + addarg(&al, NULL, 0); openlog("mailwrapper", LOG_PID, LOG_MAIL); syslog(LOG_INFO, "can't open %s, using %s as default MTA", _PATH_MAILERCONF, _PATH_DEFAULTMTA); @@ -174,6 +173,8 @@ main(argc, argv, envp) (void)fclose(config); + addarg(&al, NULL, 0); + execve(to, al.argv, envp); freearg(&al, 0); free(line); |
