From: millert Date: Tue, 16 Dec 2014 18:37:17 +0000 (+0000) Subject: Don't pass options after the to address to sendmail. The only X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a54069a84e4278cc859596f2ce657538d8af440e;p=openbsd Don't pass options after the to address to sendmail. The only legitiate use of this is to set the sender name which should be handled specifically by a different option. --- diff --git a/usr.bin/mail/mail.1 b/usr.bin/mail/mail.1 index af380cd2405..f7828c94ad4 100644 --- a/usr.bin/mail/mail.1 +++ b/usr.bin/mail/mail.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mail.1,v 1.69 2014/12/16 18:36:46 millert Exp $ +.\" $OpenBSD: mail.1,v 1.70 2014/12/16 18:37:17 millert Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -45,7 +45,6 @@ .Op Fl c Ar list .Op Fl s Ar subject .Ar to-addr ... -.Op Fl Ar sendmail-options ... .Ek .Nm mail .Op Fl dEIiNnv diff --git a/usr.bin/mail/main.c b/usr.bin/mail/main.c index b6e9ebbc039..d7faa687972 100644 --- a/usr.bin/mail/main.c +++ b/usr.bin/mail/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.25 2014/11/24 20:03:33 millert Exp $ */ +/* $OpenBSD: main.c,v 1.26 2014/12/16 18:37:17 millert Exp $ */ /* $NetBSD: main.c,v 1.7 1997/05/13 06:15:57 mikel Exp $ */ /* @@ -171,10 +171,8 @@ main(int argc, char **argv) errx(1, "Cannot give -f and people to send to"); } } else { - for (i = optind; (argv[i]) && (*argv[i] != '-'); i++) + for (i = optind; argv[i]; i++) to = cat(to, nalloc(argv[i], GTO)); - for (; argv[i]; i++) - smopts = cat(smopts, nalloc(argv[i], 0)); } /* * Check for inconsistent arguments. @@ -275,8 +273,6 @@ usage(void) fprintf(stderr, "usage: %s [-dEIinv] [-b list] [-c list] " "[-s subject] to-addr ...\n", __progname); - fprintf(stderr, " %*s [-sendmail-options ...]\n", - (int)strlen(__progname), ""); fprintf(stderr, " %s [-dEIiNnv] -f [file]\n", __progname); fprintf(stderr, " %s [-dEIiNnv] [-u user]\n", __progname); exit(1);