]> granicus.if.org Git - sudo/commitdiff
Add support for --with-stow based on patches from Robert Uhl
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 15 Mar 2003 18:01:39 +0000 (18:01 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 15 Mar 2003 18:01:39 +0000 (18:01 +0000)
INSTALL
config.h.in
configure
configure.in

diff --git a/INSTALL b/INSTALL
index 7d5fefa2936567d79334ba8f9d47d0fff7862c92..6834462e0d85d4b9ae9ffb55bce58efd90ea4534 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -147,15 +147,15 @@ Special features/options:
        (or at least the library and header files).
 
   --with-kerb4
-       Enable kerberos v4 support.  Tested only with the Cygnus Network
-       Security package (CNS).  This uses kerberos passphrases for
-       authentication but does not use the kerberos cookie scheme.
+       Enable Kerberos IV support.  Tested only with the Cygnus Network
+       Security package (CNS).  This uses Kerberos passphrases for
+       authentication but does not use the Kerberos cookie scheme.
 
   --with-kerb5
-       Enable kerberos v5 support.  Tested against MIT Kerberos V,
+       Enable Kerberos V support.  Tested against MIT Kerberos V,
        release 1.1, although also expected to work against CNS.  This
-       This uses kerberos passphrases for authentication but does not
-       use the kerberos cookie scheme.  Will not work for Kerberos V
+       This uses Kerberos passphrases for authentication but does not
+       use the Kerberos cookie scheme.  Will not work for Kerberos V
        older than version 1.1.
 
   --with-authenticate
@@ -177,7 +177,7 @@ Special features/options:
        /etc/pam.conf to obtain syslog output for debugging purposes.
 
   --with-AFS
-       Enable AFS support with kerberos authentication.  Should work under
+       Enable AFS support with Kerberos authentication.  Should work under
        AFS 3.3.  If your AFS doesn't have -laudit you should be able to
        link without it.
 
@@ -275,6 +275,11 @@ Special features/options:
   --with-otp-only
         This option is now just an alias for --without-passwd.
 
+  --with-stow
+        Properly handle GNU stow packaging.  The sudoers file will
+        physically live in ${prefix}/etc and /etc/sudoers will be
+        a symbolic link.
+
 The following options are also configurable at runtime:
 
   --with-long-otp-prompt
index 66b039c541ec2afee48ce2b116dc363becfde3f1..b83a6164c2364b7463f5ee706e4bf04c9ab4ec06 100644 (file)
    */
 #undef USE_INSULTS
 
+/* Define if you use stow packaging. */
+#undef USE_STOW
+
 /* Define if you want a different ticket file for each tty. */
 #undef USE_TTY_TICKETS
 
 # endif
 #endif
 
+/* GNU stow needs /etc/sudoers to be a symlink. */
+#ifdef HAVE_STOW
+# define stat_sudoers  stat
+#else
+# define stat_sudoers  lstat
+#endif
+
 /* Solaris doesn't use const qualifiers in PAM. */
 #ifdef sun
 # define PAM_CONST
index 507af54fa5e882c48890ee8dd4e27e034da5bb2e..1e6db3cb277f09d6864b1bc55f7bdbab4667e418 100755 (executable)
--- a/configure
+++ b/configure
@@ -926,6 +926,7 @@ Optional Packages:
   --with-goons-insults    include the insults from the "Goon Show"
   --with-secure-path      override the user's path with a builtin one
   --without-interfaces    don't try to read the ip addr of ether interfaces
+  --with-stow             properly handle GNU stow packaging
 
 Some influential environment variables:
   CC          C compiler command
@@ -1419,14 +1420,7 @@ CHECKSIA=true
 test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man'
 test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin'
 test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin'
-
-if test "$sysconfdir" = '${prefix}/etc'; then
-    if test "$prefix" = "NONE"; then
-       sysconfdir='/etc'
-    else
-       sysconfdir='$(prefix)/etc'
-    fi
-fi
+test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc'
 
 
 
@@ -2959,6 +2953,34 @@ else
 echo "${ECHO_T}yes" >&6
 fi;
 
+echo "$as_me:$LINENO: checking whether stow should be used" >&5
+echo $ECHO_N "checking whether stow should be used... $ECHO_C" >&6
+
+# Check whether --with-stow or --without-stow was given.
+if test "${with_stow+set}" = set; then
+  withval="$with_stow"
+  case $with_stow in
+    yes)       echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_STOW 1
+_ACEOF
+
+               ;;
+    no)                echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+               ;;
+    *)         { { echo "$as_me:$LINENO: error: \"--with-stow does not take an argument.\"" >&5
+echo "$as_me: error: \"--with-stow does not take an argument.\"" >&2;}
+   { (exit 1); exit 1; }; }
+               ;;
+esac
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi;
+
 
 echo "$as_me:$LINENO: checking whether to do user authentication by default" >&5
 echo $ECHO_N "checking whether to do user authentication by default... $ECHO_C" >&6
index 18c40e7194ecd2f3c595853d9a0d5fa28a656bca..b297c8f9abe187a81eee5a0f53f69e476bd73cf8 100644 (file)
@@ -110,7 +110,7 @@ dnl
 test "$mandir" = '${prefix}/man' && mandir='$(prefix)/man'
 test "$bindir" = '${exec_prefix}/bin' && bindir='$(exec_prefix)/bin'
 test "$sbindir" = '${exec_prefix}/sbin' && sbindir='$(exec_prefix)/sbin'
-test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc'
+test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc'
 
 dnl
 dnl Deprecated --with options (these all warn or generate an error)
@@ -942,6 +942,18 @@ AC_ARG_WITH(interfaces, [  --without-interfaces    don't try to read the ip addr
                ;;
 esac], AC_MSG_RESULT(yes))
 
+AC_MSG_CHECKING(whether stow should be used)
+AC_ARG_WITH(stow, [  --with-stow             properly handle GNU stow packaging],
+[case $with_stow in
+    yes)       AC_MSG_RESULT(yes)
+               AC_DEFINE(USE_STOW, 1, [Define if you use stow packaging.])
+               ;;
+    no)                AC_MSG_RESULT(no)
+               ;;
+    *)         AC_MSG_ERROR(["--with-stow does not take an argument."])
+               ;;
+esac], AC_MSG_RESULT(no))
+
 dnl
 dnl Options for --enable
 dnl
@@ -1937,6 +1949,13 @@ AH_BOTTOM([/*
 # endif
 #endif
 
+/* GNU stow needs /etc/sudoers to be a symlink. */
+#ifdef HAVE_STOW
+# define stat_sudoers  stat
+#else
+# define stat_sudoers  lstat
+#endif
+
 /* Solaris doesn't use const qualifiers in PAM. */
 #ifdef sun
 # define PAM_CONST