# HG changeset patch # User Roy Marples # Date 1590594721 0 # Node ID 8fb09d31d3882b48361617bb2897468949ff6194 # Parent be03c967ee2abe0a73d5048c5c9dbf8063f5370e For systems without open_memstream(3) warn that /tmp needs to exit Inside the privsep users home directory. diff -r be03c967ee2a -r 8fb09d31d388 configure --- a/configure Wed May 27 15:49:40 2020 +0000 +++ b/configure Wed May 27 15:52:01 2020 +0000 @@ -903,6 +903,8 @@ fi if [ "$OPEN_MEMSTREAM" = yes ]; then echo "#define HAVE_OPEN_MEMSTREAM" >>$CONFIG_H +elif [ "$PRIVSEP" = yes ]; then + echo "WARNING: Ensure that /tmp exists in the privsep users chroot" fi if [ -z "$PIDFILE_LOCK" ]; then diff -r be03c967ee2a -r 8fb09d31d388 src/script.c --- a/src/script.c Wed May 27 15:49:40 2020 +0000 +++ b/src/script.c Wed May 27 15:52:01 2020 +0000 @@ -252,8 +252,10 @@ fp = NULL; tmpfd = mkstemp(tmpfile); - if (tmpfd == -1) - goto eexit; + if (tmpfd == -1) { + logerr("%s: mkstemp", __func__); + return -1; + } unlink(tmpfile); fp = fdopen(tmpfd, "w+"); if (fp == NULL) {