patch-funzip_c 388 B

123456789101112131415
  1. $OpenBSD: patch-funzip_c,v 1.2 2015/10/20 13:13:52 ajacoutot Exp $
  2. --- funzip.c.orig Wed Oct 7 12:11:04 2015
  3. +++ funzip.c Wed Oct 7 12:12:57 2015
  4. @@ -294,6 +294,10 @@ char **argv;
  5. #else /* !CRYPT */
  6. char *s = "";
  7. #endif /* ?CRYPT */
  8. +
  9. + if (pledge("stdio rpath wpath cpath fattr tty", NULL) == -1)
  10. + err(1, "pledge");
  11. +
  12. CONSTRUCTGLOBALS();
  13. /* skip executable name */