diff options
author | 2015-11-15 04:13:17 +0000 | |
---|---|---|
committer | 2015-11-15 04:13:17 +0000 | |
commit | f9a4b902c3f0735724ed66cfec482ebfeed0cc1a (patch) | |
tree | d02aa324deda753a83610d011c50f9c61f2697cc | |
parent | In most cases binutils strips off setuid/setgid bits when creating copies (diff) | |
download | wireguard-openbsd-f9a4b902c3f0735724ed66cfec482ebfeed0cc1a.tar.xz wireguard-openbsd-f9a4b902c3f0735724ed66cfec482ebfeed0cc1a.zip |
Now that the (setuid bit related) bad-practice audit and repair is complete,
ar/ranlib and objcopy/strip can pledge "stdio rpath wpath cpath fattr"
ok guenther
-rw-r--r-- | gnu/usr.bin/binutils-2.17/binutils/ar.c | 3 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/binutils/objcopy.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils-2.17/binutils/ar.c b/gnu/usr.bin/binutils-2.17/binutils/ar.c index 138a0f4031e..179368a7471 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/ar.c +++ b/gnu/usr.bin/binutils-2.17/binutils/ar.c @@ -362,6 +362,9 @@ main (int argc, char **argv) program_name = argv[0]; xmalloc_set_program_name (program_name); + if (pledge ("stdio rpath wpath cpath fattr", NULL) == -1) + fatal (_("pledge: %s"), strerror (errno)); + expandargv (&argc, &argv); if (is_ranlib < 0) diff --git a/gnu/usr.bin/binutils-2.17/binutils/objcopy.c b/gnu/usr.bin/binutils-2.17/binutils/objcopy.c index 7b797e0707d..d57c71f3928 100644 --- a/gnu/usr.bin/binutils-2.17/binutils/objcopy.c +++ b/gnu/usr.bin/binutils-2.17/binutils/objcopy.c @@ -3264,6 +3264,9 @@ main (int argc, char *argv[]) START_PROGRESS (program_name, 0); + if (pledge ("stdio rpath wpath cpath fattr", NULL) == -1) + fatal (_("pledge: %s"), strerror (errno)); + expandargv (&argc, &argv); strip_symbols = STRIP_UNDEF; |