The branch, master has been updated via 7587e20c Output a helpful msg about configure only if the command fails. via 2e1b46db Close STDIN for early exec script. from f4e6fe54 More NEWS changes.
https://git.samba.org/?p=rsync.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 7587e20cf405021b2cbd8fe3ceebfba056e3f938 Author: Wayne Davison <wa...@opencoder.net> Date: Sun Jun 21 12:54:02 2020 -0700 Output a helpful msg about configure only if the command fails. commit 2e1b46db3912cc3542a6ef0d7507c60ab282deaf Author: Wayne Davison <wa...@opencoder.net> Date: Sun Jun 21 11:13:01 2020 -0700 Close STDIN for early exec script. ----------------------------------------------------------------------- Summary of changes: Makefile.in | 5 ++--- NEWS.md | 2 ++ clientserver.c | 3 ++- cmdormsg | 11 +++++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100755 cmdormsg Changeset truncated at 500 lines: diff --git a/Makefile.in b/Makefile.in index f52976e9..6ca7d9eb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -133,11 +133,10 @@ rounding.h: rounding.c rsync.h proto.h @rm -f rounding.out simd-checksum-x86_64.o: simd-checksum-x86_64.cpp - @echo "If this fails to compile and you can't fix it, re-run $(srcdir)/configure with --disable-simd." - $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp + @$(srcdir)/cmdormsg disable-simd $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $(srcdir)/simd-checksum-x86_64.cpp lib/md5-asm-x86_64.o: lib/md5-asm-x86_64.S config.h lib/md-defines.h - $(CC) -I. @NOEXECSTACK@ -c -o $@ $(srcdir)/lib/md5-asm-x86_64.S + @$(srcdir)/cmdormsg disable-asm $(CC) -I. @NOEXECSTACK@ -c -o $@ $(srcdir)/lib/md5-asm-x86_64.S tls$(EXEEXT): $(TLS_OBJ) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(TLS_OBJ) $(LIBS) diff --git a/NEWS.md b/NEWS.md index 95016fe4..8b3e2ed0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -19,6 +19,8 @@ Protocol: 31 (unchanged) - Fix an issue with the md2man code when building in an external dir. + - Make sure "early exec" gets no stdin. + ### ENHANCEMENTS: - Added "atimes" to the capabilities list that `--version` outputs. diff --git a/clientserver.c b/clientserver.c index b9325186..819e9f24 100644 --- a/clientserver.c +++ b/clientserver.c @@ -434,11 +434,12 @@ static pid_t start_pre_exec(const char *cmd, int *arg_fd_ptr, int *error_fd_ptr) } if (error_fd_ptr) { - close(STDIN_FILENO); dup2(error_fds[1], STDOUT_FILENO); close(error_fds[1]); } + close(STDIN_FILENO); + status = shell_exec(cmd); if (!WIFEXITED(status)) diff --git a/cmdormsg b/cmdormsg new file mode 100755 index 00000000..ccf9527f --- /dev/null +++ b/cmdormsg @@ -0,0 +1,11 @@ +#!/bin/sh + +srcdir=`dirname $0` +opt="$1" +shift + +echo "$*" +if ! "${@}"; then + echo "If you can't fix the issue, re-run $srcdir/configure with --$opt." + exit 1 +fi -- The rsync repository. _______________________________________________ rsync-cvs mailing list rsync-cvs@lists.samba.org https://lists.samba.org/mailman/listinfo/rsync-cvs