patch-src_h_bash_c 742 B

1234567891011121314151617
  1. $OpenBSD: patch-src_h_bash_c,v 1.1.1.1 2012/10/26 16:32:10 rpe Exp $
  2. If somebody wants to use shell scripts in a chrooted /var/www, use a shell
  3. builtin instead, to avoid forcing them to copy in ld.so, libc and printf.
  4. --- src/h_bash.c.orig Sat Dec 31 22:11:19 2011
  5. +++ src/h_bash.c Sat Dec 31 22:13:56 2011
  6. @@ -138,7 +138,7 @@ bash_echo (buffer_t * buf, char *str, size_t len)
  7. * we will take the (ancient) POSIX1 standard of 4K, subtract 1K from it and use that
  8. * as the maxmimum. The Linux limit appears to be 128K, so 3K will fit. */
  9. - static char echo_start[] = "printf '%s' '";
  10. + static char echo_start[] = "echo -n '";
  11. static char echo_quote[] = "'\\''";
  12. static char echo_end[] = "'\n";
  13. const size_t maxlen = 3096;