mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 18:08:23 +00:00
--with-skey and --with-opie now take an option directory argument
This obsoletes a --with-csops hack (/tools/cs/skey) Also remove the remaining direct uses of "echo"
This commit is contained in:
parent
67837e50c4
commit
e7759a8b07
12
INSTALL
12
INSTALL
@ -135,11 +135,15 @@ Special features/options:
|
|||||||
--with-csops
|
--with-csops
|
||||||
Add CSOps standard options. You probably aren't interested in this.
|
Add CSOps standard options. You probably aren't interested in this.
|
||||||
|
|
||||||
--with-skey
|
--with-skey[=DIR]
|
||||||
Enable S/Key OTP (One Time Password) support.
|
Enable S/Key OTP (One Time Password) support. If specified,
|
||||||
|
DIR should contain include and lib directories with skey.h
|
||||||
|
and libskey.a respectively.
|
||||||
|
|
||||||
--with-opie
|
--with-opie[=DIR]
|
||||||
Enable NRL OPIE OTP (One Time Password) support.
|
Enable NRL OPIE OTP (One Time Password) support. If specified,
|
||||||
|
DIR should contain include and lib directories with opie.h
|
||||||
|
and libopie.a respectively.
|
||||||
|
|
||||||
--with-SecurID[=DIR]
|
--with-SecurID[=DIR]
|
||||||
Enable SecurID support. If specified, DIR is directory containing
|
Enable SecurID support. If specified, DIR is directory containing
|
||||||
|
95
configure.in
95
configure.in
@ -238,9 +238,10 @@ AC_ARG_WITH(passwd, [ --without-passwd don't use passwd/shadow file for
|
|||||||
;;
|
;;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
AC_ARG_WITH(skey, [ --with-skey enable S/Key support ],
|
AC_ARG_WITH(skey, [ --with-skey[=DIR] enable S/Key support ],
|
||||||
[case $with_skey in
|
[case $with_skey in
|
||||||
yes) if test -n "$with_opie"; then
|
no) with_skey="";;
|
||||||
|
*) if test -n "$with_opie"; then
|
||||||
AC_MSG_ERROR(["cannot use both S/Key and OPIE"])
|
AC_MSG_ERROR(["cannot use both S/Key and OPIE"])
|
||||||
fi
|
fi
|
||||||
AC_DEFINE(HAVE_SKEY, 1, [Define if you use S/Key.])
|
AC_DEFINE(HAVE_SKEY, 1, [Define if you use S/Key.])
|
||||||
@ -248,14 +249,12 @@ AC_ARG_WITH(skey, [ --with-skey enable S/Key support ],
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
|
AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
|
||||||
;;
|
;;
|
||||||
no) ;;
|
|
||||||
*) AC_MSG_WARN([Ignoring unknown argument to --with-skey: $with_skey])
|
|
||||||
;;
|
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
AC_ARG_WITH(opie, [ --with-opie enable OPIE support ],
|
AC_ARG_WITH(opie, [ --with-opie[=DIR] enable OPIE support ],
|
||||||
[case $with_opie in
|
[case $with_opie in
|
||||||
yes) if test -n "$with_skey"; then
|
no) with_opie="";;
|
||||||
|
*) if test -n "$with_skey"; then
|
||||||
AC_MSG_ERROR(["cannot use both S/Key and OPIE"])
|
AC_MSG_ERROR(["cannot use both S/Key and OPIE"])
|
||||||
fi
|
fi
|
||||||
AC_DEFINE(HAVE_OPIE, 1, [Define if you use NRL OPIE.])
|
AC_DEFINE(HAVE_OPIE, 1, [Define if you use NRL OPIE.])
|
||||||
@ -263,9 +262,6 @@ AC_ARG_WITH(opie, [ --with-opie enable OPIE support ],
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
|
AUTH_OBJS="${AUTH_OBJS} rfc1938.o"
|
||||||
;;
|
;;
|
||||||
no) ;;
|
|
||||||
*) AC_MSG_WARN([Ignoring unknown argument to --with-opie: $with_opie])
|
|
||||||
;;
|
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
AC_ARG_WITH(long-otp-prompt, [ --with-long-otp-prompt use a two line OTP (skey/opie) prompt],
|
AC_ARG_WITH(long-otp-prompt, [ --with-long-otp-prompt use a two line OTP (skey/opie) prompt],
|
||||||
@ -1514,12 +1510,12 @@ test -n "$mansectform" || mansectform=5
|
|||||||
dnl
|
dnl
|
||||||
dnl Add in any libpaths or libraries specified via configure
|
dnl Add in any libpaths or libraries specified via configure
|
||||||
dnl
|
dnl
|
||||||
if test -n ${with_libpath}; then
|
if test -n "$with_libpath"; then
|
||||||
for i in ${with_libpath}; do
|
for i in ${with_libpath}; do
|
||||||
SUDO_APPEND_LIBPATH(LDFLAGS, [$i])
|
SUDO_APPEND_LIBPATH(LDFLAGS, [$i])
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
if test -n ${with_libraries}; then
|
if test -n "$with_libraries"; then
|
||||||
for i in ${with_libraries}; do
|
for i in ${with_libraries}; do
|
||||||
case $i in
|
case $i in
|
||||||
-l*) ;;
|
-l*) ;;
|
||||||
@ -1795,7 +1791,7 @@ if test "$with_AFS" = "yes"; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if test -z "$FOUND_AFSLIBDIR"; then
|
if test -z "$FOUND_AFSLIBDIR"; then
|
||||||
echo 'Unable to locate AFS libraries, you will have to edit the Makefile and add -L/path/to/afs/libs to SUDO_LDFLAGS or rerun configure with the --with-libpath options.'
|
AC_MSG_WARN([Unable to locate AFS libraries, you will have to edit the Makefile and add -L/path/to/afs/libs to SUDO_LDFLAGS or rerun configure with the --with-libpath options.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Order is important here. Note that we build AFS_LIBS from right to left
|
# Order is important here. Note that we build AFS_LIBS from right to left
|
||||||
@ -1822,7 +1818,7 @@ if test "$with_AFS" = "yes"; then
|
|||||||
done
|
done
|
||||||
|
|
||||||
if test -z "$FOUND_AFSLIBDIR"; then
|
if test -z "$FOUND_AFSLIBDIR"; then
|
||||||
echo 'Unable to locate AFS include dir, you may have to edit the Makefile and add -I/path/to/afs/includes to CPPFLAGS or rerun configure with the --with-incpath options.'
|
AC_MSG_WARN([Unable to locate AFS include dir, you may have to edit the Makefile and add -I/path/to/afs/includes to CPPFLAGS or rerun configure with the --with-incpath options.])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1838,36 +1834,65 @@ fi
|
|||||||
dnl
|
dnl
|
||||||
dnl extra S/Key lib and includes
|
dnl extra S/Key lib and includes
|
||||||
dnl
|
dnl
|
||||||
if test "$with_skey" = "yes"; then
|
if test -n "$with_skey"; then
|
||||||
SUDO_LIBS="${SUDO_LIBS} -lskey"
|
O_LDFLAGS="$LDFLAGS"
|
||||||
if test -f /usr/include/skey.h -a -f /usr/lib/libskey.a; then
|
if test "$with_skey" != "yes"; then
|
||||||
:
|
CPPFLAGS="${CPPFLAGS} -I${with_skey}/include"
|
||||||
elif test -f /usr/local/include/skey.h; then
|
SUDO_APPEND_LIBPATH(LDFLAGS, [${with_skey}/lib])
|
||||||
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
|
SUDO_APPEND_LIBPATH(SUDO_LDFLAGS, [${with_skey}/lib])
|
||||||
SUDO_APPEND_LIBPATH(SUDO_LDFLAGS, [/usr/local/lib])
|
AC_PREPROC_IFELSE([#include <skey.h>], [found=yes], [found=no])
|
||||||
elif test "$with_csops" = "yes" -a -f /tools/cs/skey/include/skey.h -a -f /tools/cs/skey/lib/libskey.a; then
|
|
||||||
CPPFLAGS="${CPPFLAGS} -I/tools/cs/skey/include"
|
|
||||||
SUDO_APPEND_LIBPATH(SUDO_LDFLAGS, [/tools/cs/skey/lib])
|
|
||||||
else
|
else
|
||||||
echo 'Unable to locate libskey.a and/or skey.h, you will have to edit the Makefile and add -L/path/to/skey/lib to SUDO_LDFLAGS and/or -I/path/to/skey.h to CPPFLAGS'
|
found=no
|
||||||
|
O_CPPFLAGS="$CPPFLAGS"
|
||||||
|
for dir in "" "/usr/local" "/usr/contrib"; do
|
||||||
|
test -n "$dir" && CPPFLAGS="$O_CPPFLAGS -I${dir}/include"
|
||||||
|
AC_PREPROC_IFELSE([#include <skey.h>], [found=yes; break], )
|
||||||
|
done
|
||||||
|
if test "$found" = "no" -o -z "$dir"; then
|
||||||
|
CPPFLAGS="$O_CPPFLAGS"
|
||||||
|
else
|
||||||
|
SUDO_APPEND_LIBPATH(LDFLAGS, [${dir}/lib])
|
||||||
|
SUDO_APPEND_LIBPATH(SUDO_LDFLAGS, [${dir}/lib])
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
if test "$found" = "no"; then
|
||||||
|
AC_MSG_WARN([Unable to locate skey.h, you will have to edit the Makefile and add -I/path/to/skey/includes to CPPFLAGS])
|
||||||
|
fi
|
||||||
|
AC_CHECK_LIB(skey, main, , [AC_MSG_WARN([Unable to locate libskey.a, you will have to edit the Makefile and add -L/path/to/skey/lib to SUDO_LDFLAGS])])
|
||||||
AC_CHECK_LIB(skey, skeyaccess, AC_DEFINE(HAVE_SKEYACCESS, 1, [Define if your S/Key library has skeyaccess().]))
|
AC_CHECK_LIB(skey, skeyaccess, AC_DEFINE(HAVE_SKEYACCESS, 1, [Define if your S/Key library has skeyaccess().]))
|
||||||
|
LDFLAGS="$O_LDFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl extra OPIE lib and includes
|
dnl extra OPIE lib and includes
|
||||||
dnl
|
dnl
|
||||||
if test "$with_opie" = "yes"; then
|
if test -n "$with_opie"; then
|
||||||
SUDO_LIBS="${SUDO_LIBS} -lopie"
|
O_LDFLAGS="$LDFLAGS"
|
||||||
if test -f /usr/include/opie.h -a -f /usr/lib/libopie.a; then
|
if test "$with_opie" != "yes"; then
|
||||||
:
|
CPPFLAGS="${CPPFLAGS} -I${with_opie}/include"
|
||||||
elif test -f /usr/local/include/opie.h; then
|
SUDO_APPEND_LIBPATH(LDFLAGS, [${with_opie}/lib])
|
||||||
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
|
SUDO_APPEND_LIBPATH(SUDO_LDFLAGS, [${with_opie}/lib])
|
||||||
SUDO_APPEND_LIBPATH(SUDO_LDFLAGS, [/usr/local/lib])
|
AC_PREPROC_IFELSE([#include <opie.h>], [found=yes], [found=no])
|
||||||
else
|
else
|
||||||
echo 'Unable to locate libopie.a and/or opie.h, you will have to edit the Makefile and add -L/path/to/opie/lib to SUDO_LDFLAGS and/or -I/path/to/opie.h to CPPFLAGS'
|
found=no
|
||||||
|
O_CPPFLAGS="$CPPFLAGS"
|
||||||
|
for dir in "" "/usr/local" "/usr/contrib"; do
|
||||||
|
test -n "$dir" && CPPFLAGS="$O_CPPFLAGS -I${dir}/include"
|
||||||
|
AC_PREPROC_IFELSE([#include <opie.h>], [found=yes; break], )
|
||||||
|
done
|
||||||
|
if test "$found" = "no" -o -z "$dir"; then
|
||||||
|
CPPFLAGS="$O_CPPFLAGS"
|
||||||
|
else
|
||||||
|
SUDO_APPEND_LIBPATH(LDFLAGS, [${dir}/lib])
|
||||||
|
SUDO_APPEND_LIBPATH(SUDO_LDFLAGS, [${dir}/lib])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if test "$found" = "no"; then
|
||||||
|
AC_MSG_WARN([Unable to locate opie.h, you will have to edit the Makefile and add -I/path/to/opie/includes to CPPFLAGS])
|
||||||
|
fi
|
||||||
|
AC_CHECK_LIB(opie, main, , [AC_MSG_WARN([Unable to locate libopie.a, you will have to edit the Makefile and add -L/path/to/opie/lib to SUDO_LDFLAGS])])
|
||||||
|
LDFLAGS="$O_LDFLAGS"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl extra SecurID lib + includes
|
dnl extra SecurID lib + includes
|
||||||
@ -1974,13 +1999,11 @@ dnl
|
|||||||
dnl Spew any text the user needs to know about
|
dnl Spew any text the user needs to know about
|
||||||
dnl
|
dnl
|
||||||
if test "$with_pam" = "yes"; then
|
if test "$with_pam" = "yes"; then
|
||||||
echo ""
|
|
||||||
case $host in
|
case $host in
|
||||||
*-*-linux*)
|
*-*-linux*)
|
||||||
echo "You will need to customize sample.pam and install it as /etc/pam.d/sudo"
|
AC_MSG_NOTICE([You will need to customize sample.pam and install it as /etc/pam.d/sudo])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo ""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user