in cat mode (-c, zcat), or in test mode (-t), or if there are no
file arguments and there is no -o outfile. Due to fts(3) we require
rpath even for compress <in >out.
"seems sound" deraadt@
-/* $OpenBSD: main.c,v 1.89 2015/10/09 01:37:07 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.90 2015/10/17 21:34:07 naddy Exp $ */
/*
* Copyright (c) 1992, 1993
argc -= optind;
argv += optind;
+ if (cflag || testmode || (!oflag && argc == 0))
+ if (pledge("stdio rpath", NULL) == -1)
+ err(1, "pledge");
+
if (argc == 0) {
argv = calloc(2, sizeof(char *));
if (argv == NULL)