From ecfe3494784be4f0b8dcc5bbae46f6782c4473e2 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 10 Oct 2015 20:35:00 +0000 Subject: [PATCH] normalize a few more tame request orderings, to help review --- bin/ksh/main.c | 4 ++-- libexec/comsat/comsat.c | 4 ++-- usr.bin/find/find.c | 4 ++-- usr.bin/finger/finger.c | 8 ++++---- usr.bin/kdump/kdump.c | 4 ++-- usr.bin/lock/lock.c | 4 ++-- usr.bin/rcs/rcsprog.c | 4 ++-- usr.bin/sendbug/sendbug.c | 4 ++-- usr.bin/stat/stat.c | 4 ++-- usr.sbin/syslogd/syslogd.c | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/bin/ksh/main.c b/bin/ksh/main.c index c6bfd305820..8cf21dc96e5 100644 --- a/bin/ksh/main.c +++ b/bin/ksh/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.61 2015/10/10 00:10:07 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.62 2015/10/10 20:35:00 deraadt Exp $ */ /* * startup, main loop, environments and error handling @@ -103,7 +103,7 @@ main(int argc, char *argv[]) kshname = argv[0]; #ifndef MKNOD - if (pledge("stdio rpath wpath cpath getpw fattr proc exec tty", NULL) == -1) + if (pledge("stdio rpath wpath cpath fattr getpw proc exec tty", NULL) == -1) perror("pledge"); #endif diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c index d0836b7ef36..9795b4d8063 100644 --- a/libexec/comsat/comsat.c +++ b/libexec/comsat/comsat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: comsat.c,v 1.42 2015/10/09 17:09:06 deraadt Exp $ */ +/* $OpenBSD: comsat.c,v 1.43 2015/10/10 20:35:00 deraadt Exp $ */ /* * Copyright (c) 1980, 1993 @@ -83,7 +83,7 @@ main(int argc, char *argv[]) char msgbuf[100]; sigset_t sigset; - if (pledge("stdio rpath wpath tty proc", NULL) == -1) + if (pledge("stdio rpath wpath proc tty", NULL) == -1) err(1, "pledge"); /* verify proper invocation */ diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index 3aa979b95c7..7213d31243a 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -1,4 +1,4 @@ -/* $OpenBSD: find.c,v 1.19 2015/10/09 01:37:07 deraadt Exp $ */ +/* $OpenBSD: find.c,v 1.20 2015/10/10 20:35:00 deraadt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -155,7 +155,7 @@ find_execute(PLAN *plan, /* search plan */ PLAN *p; if (mayexecve == 0) - if (pledge("stdio getpw rpath", NULL) == -1) + if (pledge("stdio rpath getpw", NULL) == -1) err(1, "pledge"); rval = 0; diff --git a/usr.bin/finger/finger.c b/usr.bin/finger/finger.c index d8b755cbd1e..cd06cce8599 100644 --- a/usr.bin/finger/finger.c +++ b/usr.bin/finger/finger.c @@ -1,4 +1,4 @@ -/* $OpenBSD: finger.c,v 1.22 2015/10/09 01:37:07 deraadt Exp $ */ +/* $OpenBSD: finger.c,v 1.23 2015/10/10 20:35:00 deraadt Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -126,7 +126,7 @@ main(int argc, char *argv[]) mflag++; } - if (pledge("stdio getpw rpath inet", NULL) == -1) + if (pledge("stdio rpath getpw inet", NULL) == -1) err(1, "pledge"); (void)time(&now); @@ -137,7 +137,7 @@ main(int argc, char *argv[]) * not selected. Force the -s BEFORE we get names so proper * screening will be done. */ - if (pledge("stdio getpw rpath", NULL) == -1) + if (pledge("stdio rpath getpw", NULL) == -1) err(1, "pledge"); if (!lflag) sflag = 1; /* if -l not explicit, force -s */ @@ -220,7 +220,7 @@ userlist(int argc, char **argv) goto net; if (nettail == &nethead) - if (pledge("stdio getpw rpath", NULL) == -1) + if (pledge("stdio rpath getpw", NULL) == -1) err(1, "pledge"); /* diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 5fa69cdaaef..a948b71e36e 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kdump.c,v 1.114 2015/10/10 19:19:46 deraadt Exp $ */ +/* $OpenBSD: kdump.c,v 1.115 2015/10/10 20:35:00 deraadt Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -241,7 +241,7 @@ main(int argc, char *argv[]) if (argc > optind) usage(); - if (pledge("stdio getpw rpath", NULL) == -1) + if (pledge("stdio rpath getpw", NULL) == -1) err(1, "pledge"); m = malloc(size = 1025); diff --git a/usr.bin/lock/lock.c b/usr.bin/lock/lock.c index 572f501081e..9c74e87b54c 100644 --- a/usr.bin/lock/lock.c +++ b/usr.bin/lock/lock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lock.c,v 1.30 2015/10/09 01:37:08 deraadt Exp $ */ +/* $OpenBSD: lock.c,v 1.31 2015/10/10 20:35:01 deraadt Exp $ */ /* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */ /* @@ -90,7 +90,7 @@ main(int argc, char *argv[]) usemine = 0; no_timeout = 0; - if (pledge("stdio getpw rpath wpath tty", NULL) == -1) + if (pledge("stdio rpath wpath getpw tty", NULL) == -1) err(1, "pledge"); if (!(pw = getpwuid(getuid()))) diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c index f6a1996abf3..383cf2736cc 100644 --- a/usr.bin/rcs/rcsprog.c +++ b/usr.bin/rcs/rcsprog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsprog.c,v 1.157 2015/10/10 18:58:53 deraadt Exp $ */ +/* $OpenBSD: rcsprog.c,v 1.158 2015/10/10 20:35:01 deraadt Exp $ */ /* * Copyright (c) 2005 Jean-Francois Brousseau * All rights reserved. @@ -128,7 +128,7 @@ main(int argc, char **argv) char **cmd_argv; int ret, cmd_argc; - if (pledge("stdio getpw rpath wpath cpath fattr", NULL) == -1) + if (pledge("stdio rpath wpath cpath fattr getpw", NULL) == -1) err(1, "pledge"); ret = -1; diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c index ab760d0175a..af83406d82d 100644 --- a/usr.bin/sendbug/sendbug.c +++ b/usr.bin/sendbug/sendbug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.70 2015/10/10 19:10:20 deraadt Exp $ */ +/* $OpenBSD: sendbug.c,v 1.71 2015/10/10 20:35:01 deraadt Exp $ */ /* * Written by Ray Lai . @@ -86,7 +86,7 @@ main(int argc, char *argv[]) time_t mtime; FILE *fp; - if (pledge("stdio getpw rpath wpath cpath tmppath proc exec", NULL) == -1) + if (pledge("stdio rpath wpath cpath tmppath getpw proc exec", NULL) == -1) err(1, "pledge"); while ((ch = getopt(argc, argv, "DEPV")) != -1) diff --git a/usr.bin/stat/stat.c b/usr.bin/stat/stat.c index ee607f47532..9600d5807d6 100644 --- a/usr.bin/stat/stat.c +++ b/usr.bin/stat/stat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stat.c,v 1.20 2015/10/09 01:37:08 deraadt Exp $ */ +/* $OpenBSD: stat.c,v 1.21 2015/10/10 20:35:01 deraadt Exp $ */ /* $NetBSD: stat.c,v 1.19 2004/06/20 22:20:16 jmc Exp $ */ /* @@ -158,7 +158,7 @@ main(int argc, char *argv[]) int lsF, fmtchar, usestat, fn, nonl, quiet; char *statfmt, *options, *synopsis; - if (pledge("stdio getpw rpath", NULL) == -1) + if (pledge("stdio rpath getpw", NULL) == -1) err(1, "pledge"); lsF = 0; diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 5e4bda64934..a9364ebb317 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogd.c,v 1.194 2015/10/09 16:58:25 bluhm Exp $ */ +/* $OpenBSD: syslogd.c,v 1.195 2015/10/10 20:35:01 deraadt Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -707,7 +707,7 @@ main(int argc, char *argv[]) if (priv_init(ConfFile, NoDNS, lockpipe[1], nullfd, argv) < 0) errx(1, "unable to privsep"); - if (pledge("stdio rpath unix inet recvfd proc", NULL) == -1) + if (pledge("stdio rpath unix inet proc recvfd", NULL) == -1) err(1, "pledge"); /* Process is now unprivileged and inside a chroot */ -- 2.20.1