diff options
-rw-r--r-- | usr.bin/find/find.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/find/find.c b/usr.bin/find/find.c index ace199bbb54..e8f3db9f046 100644 --- a/usr.bin/find/find.c +++ b/usr.bin/find/find.c @@ -1,4 +1,4 @@ -/* $OpenBSD: find.c,v 1.21 2017/01/03 21:31:16 tedu Exp $ */ +/* $OpenBSD: find.c,v 1.22 2017/01/04 09:21:26 tb Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -162,6 +162,15 @@ find_execute(PLAN *plan, /* search plan */ if (pledge("stdio rpath getpw", NULL) == -1) err(1, "pledge"); } + } else { + if (isdelete) { + if (pledge("stdio rpath cpath getpw proc exec", NULL) + == -1) + err(1, "pledge"); + } else { + if (pledge("stdio rpath getpw proc exec", NULL) == -1) + err(1, "pledge"); + } } rval = 0; |