-/* $OpenBSD: unexpand.c,v 1.10 2009/10/27 23:59:46 deraadt Exp $ */
+/* $OpenBSD: unexpand.c,v 1.11 2015/10/10 14:23:46 deraadt Exp $ */
/* $NetBSD: unexpand.c,v 1.5 1994/12/24 17:08:05 cgd Exp $ */
/*-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
char genbuf[BUFSIZ];
char linebuf[BUFSIZ];
{
char *cp;
+ if (pledge("stdio rpath", NULL) == -1)
+ perror("pledge");
+
argc--, argv++;
if (argc > 0 && argv[0][0] == '-') {
if (strcmp(argv[0], "-a") != 0) {
-/* $OpenBSD: main.c,v 1.26 2014/03/13 00:33:55 tedu Exp $ */
+/* $OpenBSD: main.c,v 1.27 2015/10/10 14:23:47 deraadt Exp $ */
/* $NetBSD: main.c,v 1.5 1996/03/19 03:21:38 jtc Exp $ */
/*
int
main(int argc, char *argv[])
{
+ if (pledge("stdio rpath wpath cpath", NULL) == -1)
+ fatal("pledge: invalid arguments");
+
set_signals();
getargs(argc, argv);
open_files();