diff options
author | imp <imp@cvs.openbsd.org> | 2000-01-10 05:34:33 +0000 |
---|---|---|
committer | imp <imp@cvs.openbsd.org> | 2000-01-10 05:34:33 +0000 |
commit | 96e025573939dd90b8d0111523a4104c352b3679 (patch) | |
tree | 6d830b2541fa394c3dbffe65203c7759220f3837 | |
parent | 97cc2be43642d312fc6e64d7a46af8522f277fc7 (diff) |
Place NULL arg on end of argv array only after all other args. mickey@ ok
-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); |