Add configure check for sha1sum and use "openssh dgst -sha1" if missing.
Only needed when building the seed corpus zip files.
This commit is contained in:
47
configure
vendored
47
configure
vendored
@@ -684,6 +684,7 @@ NROFFPROG
|
|||||||
MANDOCPROG
|
MANDOCPROG
|
||||||
TRPROG
|
TRPROG
|
||||||
UNAMEPROG
|
UNAMEPROG
|
||||||
|
SHA1SUM
|
||||||
LT_SYS_LIBRARY_PATH
|
LT_SYS_LIBRARY_PATH
|
||||||
OTOOL64
|
OTOOL64
|
||||||
OTOOL
|
OTOOL
|
||||||
@@ -16785,6 +16786,52 @@ fi
|
|||||||
NOEXECFILE="sudo_noexec.so"
|
NOEXECFILE="sudo_noexec.so"
|
||||||
NOEXECDIR="`echo $noexec_file|sed -e 's:^${\([^}]*\)}:$(\1):' -e 's:^\(.*\)/[^/]*:\1:'`"
|
NOEXECDIR="`echo $noexec_file|sed -e 's:^${\([^}]*\)}:$(\1):' -e 's:^\(.*\)/[^/]*:\1:'`"
|
||||||
|
|
||||||
|
# Extract the first word of "sha1sum", so it can be a program name with args.
|
||||||
|
set dummy sha1sum; ac_word=$2
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||||
|
printf %s "checking for $ac_word... " >&6; }
|
||||||
|
if test ${ac_cv_path_SHA1SUM+y}
|
||||||
|
then :
|
||||||
|
printf %s "(cached) " >&6
|
||||||
|
else $as_nop
|
||||||
|
case $SHA1SUM in
|
||||||
|
[\\/]* | ?:[\\/]*)
|
||||||
|
ac_cv_path_SHA1SUM="$SHA1SUM" # Let the user override the test with a path.
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
|
for as_dir in $PATH
|
||||||
|
do
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
case $as_dir in #(((
|
||||||
|
'') as_dir=./ ;;
|
||||||
|
*/) ;;
|
||||||
|
*) as_dir=$as_dir/ ;;
|
||||||
|
esac
|
||||||
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
|
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
|
||||||
|
ac_cv_path_SHA1SUM="$as_dir$ac_word$ac_exec_ext"
|
||||||
|
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
IFS=$as_save_IFS
|
||||||
|
|
||||||
|
test -z "$ac_cv_path_SHA1SUM" && ac_cv_path_SHA1SUM="openssl dgst -sha1"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
SHA1SUM=$ac_cv_path_SHA1SUM
|
||||||
|
if test -n "$SHA1SUM"; then
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHA1SUM" >&5
|
||||||
|
printf "%s\n" "$SHA1SUM" >&6; }
|
||||||
|
else
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
printf "%s\n" "no" >&6; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Extract the first word of "uname", so it can be a program name with args.
|
# Extract the first word of "uname", so it can be a program name with args.
|
||||||
set dummy uname; ac_word=$2
|
set dummy uname; ac_word=$2
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||||
|
@@ -1714,6 +1714,7 @@ NOEXECDIR="`echo $noexec_file|sed -e 's:^${\([[^}]]*\)}:$(\1):' -e 's:^\(.*\)/[[
|
|||||||
dnl
|
dnl
|
||||||
dnl Find programs we use
|
dnl Find programs we use
|
||||||
dnl
|
dnl
|
||||||
|
AC_PATH_PROG(SHA1SUM, [sha1sum], [openssl dgst -sha1])
|
||||||
AC_PATH_PROG(UNAMEPROG, [uname], [uname])
|
AC_PATH_PROG(UNAMEPROG, [uname], [uname])
|
||||||
AC_PATH_PROG(TRPROG, [tr], [tr])
|
AC_PATH_PROG(TRPROG, [tr], [tr])
|
||||||
AC_PATH_PROG(MANDOCPROG, [mandoc], [mandoc])
|
AC_PATH_PROG(MANDOCPROG, [mandoc], [mandoc])
|
||||||
|
@@ -34,6 +34,8 @@ cross_compiling = @CROSS_COMPILING@
|
|||||||
# Compiler & tools to use
|
# Compiler & tools to use
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
|
SHA1SUM = @SHA1SUM@
|
||||||
|
SED = @SED@
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
LT_LIBS = $(top_builddir)/lib/eventlog/libsudo_eventlog.la \
|
LT_LIBS = $(top_builddir)/lib/eventlog/libsudo_eventlog.la \
|
||||||
@@ -188,7 +190,7 @@ fuzz_iolog_json_seed_corpus.zip:
|
|||||||
tdir=fuzz_iolog_json.$$$$; \
|
tdir=fuzz_iolog_json.$$$$; \
|
||||||
mkdir $$tdir; \
|
mkdir $$tdir; \
|
||||||
for f in $(FUZZ_IOLOG_JSON_CORPUS); do \
|
for f in $(FUZZ_IOLOG_JSON_CORPUS); do \
|
||||||
cp $$f $$tdir/`sha1sum $$f | cut -d' ' -f1`; \
|
cp $$f $$tdir/`$(SHA1SUM) $$f | $(SED) -e 's/^.*= *//' -e 's/ .*//'`; \
|
||||||
done; \
|
done; \
|
||||||
zip -j $@ $$tdir/*; \
|
zip -j $@ $$tdir/*; \
|
||||||
rm -rf $$tdir
|
rm -rf $$tdir
|
||||||
@@ -214,7 +216,7 @@ fuzz_iolog_legacy_seed_corpus.zip:
|
|||||||
tdir=fuzz_iolog_legacy.$$$$; \
|
tdir=fuzz_iolog_legacy.$$$$; \
|
||||||
mkdir $$tdir; \
|
mkdir $$tdir; \
|
||||||
for f in $(FUZZ_IOLOG_LEGACY_CORPUS); do \
|
for f in $(FUZZ_IOLOG_LEGACY_CORPUS); do \
|
||||||
cp $$f $$tdir/`sha1sum $$f | cut -d' ' -f1`; \
|
cp $$f $$tdir/`$(SHA1SUM) $$f | $(SED) -e 's/^.*= *//' -e 's/ .*//'`; \
|
||||||
done; \
|
done; \
|
||||||
zip -j $@ $$tdir/*; \
|
zip -j $@ $$tdir/*; \
|
||||||
rm -rf $$tdir
|
rm -rf $$tdir
|
||||||
@@ -240,7 +242,7 @@ fuzz_iolog_timing_seed_corpus.zip:
|
|||||||
tdir=fuzz_iolog_timing.$$$$; \
|
tdir=fuzz_iolog_timing.$$$$; \
|
||||||
mkdir $$tdir; \
|
mkdir $$tdir; \
|
||||||
for f in $(FUZZ_IOLOG_TIMING_CORPUS); do \
|
for f in $(FUZZ_IOLOG_TIMING_CORPUS); do \
|
||||||
cp $$f $$tdir/`sha1sum $$f | cut -d' ' -f1`; \
|
cp $$f $$tdir/`$(SHA1SUM) $$f | $(SED) -e 's/^.*= *//' -e 's/ .*//'`; \
|
||||||
done; \
|
done; \
|
||||||
zip -j $@ $$tdir/*; \
|
zip -j $@ $$tdir/*; \
|
||||||
rm -rf $$tdir
|
rm -rf $$tdir
|
||||||
|
@@ -54,6 +54,7 @@ HOSTCC = @CC_FOR_BUILD@
|
|||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
HOSTCPP = @CPP_FOR_BUILD@
|
HOSTCPP = @CPP_FOR_BUILD@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
|
SHA1SUM = @SHA1SUM@
|
||||||
SED = @SED@
|
SED = @SED@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
|
|
||||||
@@ -318,7 +319,7 @@ fuzz_sudo_conf_seed_corpus.zip:
|
|||||||
tdir=fuzz_sudo_conf.$$$$; \
|
tdir=fuzz_sudo_conf.$$$$; \
|
||||||
mkdir $$tdir; \
|
mkdir $$tdir; \
|
||||||
for f in $(FUZZ_SUDO_CONF_CORPUS); do \
|
for f in $(FUZZ_SUDO_CONF_CORPUS); do \
|
||||||
cp $$f $$tdir/`sha1sum $$f | cut -d' ' -f1`; \
|
cp $$f $$tdir/`$(SHA1SUM) $$f | $(SED) -e 's/^.*= *//' -e 's/ .*//'`; \
|
||||||
done; \
|
done; \
|
||||||
zip -j $@ $$tdir/*; \
|
zip -j $@ $$tdir/*; \
|
||||||
rm -rf $$tdir
|
rm -rf $$tdir
|
||||||
|
@@ -35,6 +35,7 @@ cross_compiling = @CROSS_COMPILING@
|
|||||||
# Compiler & tools to use
|
# Compiler & tools to use
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
|
SHA1SUM = @SHA1SUM@
|
||||||
SED = @SED@
|
SED = @SED@
|
||||||
|
|
||||||
# Our install program supports extra flags...
|
# Our install program supports extra flags...
|
||||||
@@ -174,7 +175,7 @@ fuzz_logsrvd_conf_seed_corpus.zip:
|
|||||||
tdir=fuzz_logsrvd_conf.$$$$; \
|
tdir=fuzz_logsrvd_conf.$$$$; \
|
||||||
mkdir $$tdir; \
|
mkdir $$tdir; \
|
||||||
for f in $(FUZZ_LOGSRVD_CONF_CORPUS); do \
|
for f in $(FUZZ_LOGSRVD_CONF_CORPUS); do \
|
||||||
cp $$f $$tdir/`sha1sum $$f | cut -d' ' -f1`; \
|
cp $$f $$tdir/`$(SHA1SUM) $$f | $(SED) -e 's/^.*= *//' -e 's/ .*//'`; \
|
||||||
done; \
|
done; \
|
||||||
zip -j $@ $$tdir/*; \
|
zip -j $@ $$tdir/*; \
|
||||||
rm -rf $$tdir
|
rm -rf $$tdir
|
||||||
|
@@ -44,6 +44,7 @@ cross_compiling = @CROSS_COMPILING@
|
|||||||
# Compiler & tools to use
|
# Compiler & tools to use
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
|
SHA1SUM = @SHA1SUM@
|
||||||
FLEX = @FLEX@
|
FLEX = @FLEX@
|
||||||
YACC = @YACC@
|
YACC = @YACC@
|
||||||
SED = @SED@
|
SED = @SED@
|
||||||
@@ -407,7 +408,7 @@ fuzz_policy_seed_corpus.zip:
|
|||||||
tdir=fuzz_policy.$$$$; \
|
tdir=fuzz_policy.$$$$; \
|
||||||
mkdir $$tdir; \
|
mkdir $$tdir; \
|
||||||
for f in $(FUZZ_POLICY_CORPUS); do \
|
for f in $(FUZZ_POLICY_CORPUS); do \
|
||||||
cp $$f $$tdir/`sha1sum $$f | cut -d' ' -f1`; \
|
cp $$f $$tdir/`$(SHA1SUM) $$f | $(SED) -e 's/^.*= *//' -e 's/ .*//'`; \
|
||||||
done; \
|
done; \
|
||||||
zip -j $@ $$tdir/*; \
|
zip -j $@ $$tdir/*; \
|
||||||
rm -rf $$tdir
|
rm -rf $$tdir
|
||||||
@@ -433,7 +434,7 @@ fuzz_sudoers_seed_corpus.zip:
|
|||||||
tdir=fuzz_sudoers.$$$$; \
|
tdir=fuzz_sudoers.$$$$; \
|
||||||
mkdir $$tdir; \
|
mkdir $$tdir; \
|
||||||
for f in $(FUZZ_SUDOERS_CORPUS); do \
|
for f in $(FUZZ_SUDOERS_CORPUS); do \
|
||||||
cp $$f $$tdir/`sha1sum $$f | cut -d' ' -f1`; \
|
cp $$f $$tdir/`$(SHA1SUM) $$f | $(SED) -e 's/^.*= *//' -e 's/ .*//'`; \
|
||||||
done; \
|
done; \
|
||||||
zip -j $@ $$tdir/*; \
|
zip -j $@ $$tdir/*; \
|
||||||
rm -rf $$tdir
|
rm -rf $$tdir
|
||||||
@@ -459,7 +460,7 @@ fuzz_sudoers_ldif_seed_corpus.zip:
|
|||||||
tdir=fuzz_sudoers_ldif.$$$$; \
|
tdir=fuzz_sudoers_ldif.$$$$; \
|
||||||
mkdir $$tdir; \
|
mkdir $$tdir; \
|
||||||
for f in $(FUZZ_SUDOERS_LDIF_CORPUS); do \
|
for f in $(FUZZ_SUDOERS_LDIF_CORPUS); do \
|
||||||
cp $$f $$tdir/`sha1sum $$f | cut -d' ' -f1`; \
|
cp $$f $$tdir/`$(SHA1SUM) $$f | $(SED) -e 's/^.*= *//' -e 's/ .*//'`; \
|
||||||
done; \
|
done; \
|
||||||
zip -j $@ $$tdir/*; \
|
zip -j $@ $$tdir/*; \
|
||||||
rm -rf $$tdir
|
rm -rf $$tdir
|
||||||
|
Reference in New Issue
Block a user