it allows chown(2) call to change the user or group on a file.
- usr.bin/compress : aka gzip
- usr.bin/mg : open a file for writing
- usr.bin/sed : inplace editing
- usr.bin/sort : if outfile equals one of the input files
ok deraadt@ tb@
(and a reminder from Remi Locherer)
warning: in order to use it, you must have a recent kernel with the new
promise.
-/* $OpenBSD: main.c,v 1.90 2015/10/17 21:34:07 naddy Exp $ */
+/* $OpenBSD: main.c,v 1.91 2016/07/14 08:31:18 semarie Exp $ */
/*
* Copyright (c) 1992, 1993
char outfile[PATH_MAX], _infile[PATH_MAX], suffix[16];
int bits, ch, error, rc, cflag, oflag;
- if (pledge("stdio rpath wpath cpath fattr", NULL) == -1)
+ if (pledge("stdio rpath wpath cpath fattr chown", NULL) == -1)
err(1, "pledge");
bits = cflag = oflag = 0;
-/* $OpenBSD: main.c,v 1.82 2016/04/14 17:05:32 lum Exp $ */
+/* $OpenBSD: main.c,v 1.83 2016/07/14 08:31:18 semarie Exp $ */
/* This file is in the public domain. */
int nobackups = 0, bro = 0;
struct buffer *bp = NULL;
- if (pledge("stdio rpath wpath cpath fattr getpw tty proc exec", NULL) == -1)
+ if (pledge("stdio rpath wpath cpath fattr chown getpw tty proc exec",
+ NULL) == -1)
err(1, "pledge");
while ((o = getopt(argc, argv, "nRf:")) != -1)
-/* $OpenBSD: main.c,v 1.32 2016/03/17 05:27:10 bentley Exp $ */
+/* $OpenBSD: main.c,v 1.33 2016/07/14 08:31:18 semarie Exp $ */
/*-
* Copyright (c) 1992 Diomidis Spinellis.
termwidth = 80;
if (inplace != NULL) {
- if (pledge("stdio rpath wpath cpath fattr", NULL) == -1)
+ if (pledge("stdio rpath wpath cpath fattr chown", NULL) == -1)
error(FATAL, "pledge: %s", strerror(errno));
} else {
if (pledge("stdio rpath wpath cpath", NULL) == -1)
-/* $OpenBSD: sort.c,v 1.85 2015/10/24 15:19:01 millert Exp $ */
+/* $OpenBSD: sort.c,v 1.86 2016/07/14 08:31:18 semarie Exp $ */
/*-
* Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org>
set_hw_params();
- if (pledge("stdio rpath wpath cpath fattr proc exec", NULL) == -1)
+ if (pledge("stdio rpath wpath cpath fattr chown proc exec", NULL) == -1)
err(2, "pledge");
outfile = "-";
argv += optind;
if (compress_program == NULL) {
- if (pledge("stdio rpath wpath cpath fattr", NULL) == -1)
+ if (pledge("stdio rpath wpath cpath fattr chown", NULL) == -1)
err(2, "pledge");
}