=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/from/from.c,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** src/usr.bin/from/from.c 2015/10/07 06:51:50 1.21 --- src/usr.bin/from/from.c 2015/10/09 01:37:07 1.22 *************** *** 1,4 **** ! /* $OpenBSD: from.c,v 1.21 2015/10/07 06:51:50 deraadt Exp $ */ /* $NetBSD: from.c,v 1.6 1995/09/01 01:39:10 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: from.c,v 1.22 2015/10/09 01:37:07 deraadt Exp $ */ /* $NetBSD: from.c,v 1.6 1995/09/01 01:39:10 jtc Exp $ */ /* *************** *** 74,89 **** } argv += optind; ! if (tame("stdio rpath getpw", NULL) == -1) ! err(1, "tame"); file = mail_spool(file, *argv); if ((fp = fopen(file, "r")) == NULL) { if (!fflag && errno == ENOENT) exit(EXIT_SUCCESS); err(1, "%s", file); } ! if (tame("stdio", NULL) == -1) ! err(1, "tame"); for (newline = 1; (linelen = getline(&line, &linesize, fp)) != -1;) { if (*line == '\n') { newline = 1; --- 74,89 ---- } argv += optind; ! if (pledge("stdio rpath getpw", NULL) == -1) ! err(1, "pledge"); file = mail_spool(file, *argv); if ((fp = fopen(file, "r")) == NULL) { if (!fflag && errno == ENOENT) exit(EXIT_SUCCESS); err(1, "%s", file); } ! if (pledge("stdio", NULL) == -1) ! err(1, "pledge"); for (newline = 1; (linelen = getline(&line, &linesize, fp)) != -1;) { if (*line == '\n') { newline = 1;