Install plugins manually instead of using libtool. This works
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 10 Mar 2011 15:57:56 +0000 (10:57 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 10 Mar 2011 15:57:56 +0000 (10:57 -0500)
around a problem on AIX where libtool will install a .a file
containing the .so file instead of the .so file itself.

configure
configure.in
plugins/sample/Makefile.in
plugins/sample_group/Makefile.in
plugins/sudoers/Makefile.in

index d303ac66194cc865034cd2ddce4a1f2b2ea6921b..e832f79439fd76c519747a51f78c86c0c4eda0df 100755 (executable)
--- a/configure
+++ b/configure
@@ -694,6 +694,7 @@ BSDAUTH_USAGE
 DONT_LEAK_PATH_INFO
 INSTALL_NOEXEC
 noexec_file
+SOEXT
 PLUGINDIR
 NOEXECDIR
 NOEXECFILE
@@ -2835,6 +2836,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;}
 
 
 
+
 
 
 #
@@ -12757,13 +12759,16 @@ CC="$lt_save_CC"
 
 if test "$enable_shared" = "no"; then
     with_noexec=no
+    enable_dlopen=no
+    lt_cv_dlopen=none
+    lt_cv_dlopen_libs=
 else
     eval _shrext="$shrext_cmds"
     # Darwin uses .dylib for libraries but .so for modules
     if test X"$_shrext" = X".dylib"; then
-       _shrext2=".so"
+       SOEXT=".so"
     else
-       _shrext2="$_shrext"
+       SOEXT="$_shrext"
     fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking path to sudo_noexec.so" >&5
@@ -18920,7 +18925,7 @@ EOF
 EOF
 
     cat >>confdefs.h <<EOF
-#define SUDOERS_PLUGIN "sudoers$_shrext2"
+#define SUDOERS_PLUGIN "sudoers${SOEXT}"
 EOF
 
     exec_prefix="$oexec_prefix"
index 1a447beaaacf51df5de7d2022ced5352759f546e..90f2da5cd67f5165e9a6eb9ca4c9cd1ab4cbd03c 100644 (file)
@@ -48,6 +48,7 @@ AC_SUBST([mansrcdir])
 AC_SUBST([NOEXECFILE])
 AC_SUBST([NOEXECDIR])
 AC_SUBST([PLUGINDIR])
+AC_SUBST([SOEXT])
 AC_SUBST([noexec_file])
 AC_SUBST([INSTALL_NOEXEC])
 AC_SUBST([DONT_LEAK_PATH_INFO])
@@ -1363,17 +1364,19 @@ LT_INIT([dlopen])
 
 dnl
 dnl Defer with_noexec until after libtool magic runs
-dnl XXX - also disable plugins if enable_shared=no
 dnl
 if test "$enable_shared" = "no"; then
     with_noexec=no
+    enable_dlopen=no
+    lt_cv_dlopen=none
+    lt_cv_dlopen_libs=
 else
     eval _shrext="$shrext_cmds"
     # Darwin uses .dylib for libraries but .so for modules
     if test X"$_shrext" = X".dylib"; then
-       _shrext2=".so"
+       SOEXT=".so"
     else
-       _shrext2="$_shrext"
+       SOEXT="$_shrext"
     fi
 fi
 AC_MSG_CHECKING(path to sudo_noexec.so)
@@ -2877,7 +2880,7 @@ if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
     fi
     eval PLUGINDIR="$with_plugindir"
     SUDO_DEFINE_UNQUOTED(_PATH_SUDO_PLUGIN_DIR, "$PLUGINDIR/")
-    SUDO_DEFINE_UNQUOTED(SUDOERS_PLUGIN, "sudoers$_shrext2")
+    SUDO_DEFINE_UNQUOTED(SUDOERS_PLUGIN, "sudoers${SOEXT}")
     exec_prefix="$oexec_prefix"
 fi
 
index b7ad35b1a346683b499d300d835d1f0ada0873bc..d9768f06a7af42c1917f5e7db0ab1c26e06c4328 100644 (file)
@@ -54,6 +54,7 @@ libexecdir = @libexecdir@
 datarootdir = @datarootdir@
 localstatedir = @localstatedir@
 plugindir = @PLUGINDIR@
+soext = @SOEXT@
 
 # OS dependent defines
 DEFS = @OSDEFS@
@@ -96,10 +97,10 @@ install-includes:
 install-doc:
 
 install-plugin: install-dirs sample_plugin.la
-       $(LIBTOOL) --mode=install --quiet $(INSTALL) -b~ sample_plugin.la $(DESDTDIR)/$(plugindir)
+       $(INSTALL) -b~ -M 0755 .libs/sample_plugin$(soext) $(DESTDIR)$(plugindir)
 
 uninstall:
-       -$(LIBTOOL) --mode=uninstall rm -f $(DESDTDIR)/$(plugindir)/sample_plugin.la
+       -rm -f $(DESTDIR)$(plugindir)/sample_plugin$(soext)
 
 check:
 
index a4326c75e854565eb683c6069bc0b992dbc98daa..d541a69d9b716e1ab88f4ad5e12fe21502c56101 100644 (file)
@@ -54,6 +54,7 @@ libexecdir = @libexecdir@
 datarootdir = @datarootdir@
 localstatedir = @localstatedir@
 plugindir = @PLUGINDIR@
+soext = @SOEXT@
 
 # OS dependent defines
 DEFS = @OSDEFS@
@@ -99,10 +100,10 @@ install-includes:
 install-doc:
 
 install-plugin: install-dirs sample_group.la
-       $(LIBTOOL) --mode=install --quiet $(INSTALL) -b~ sample_group.la $(DESDTDIR)/$(plugindir)
+       $(INSTALL) -b~ -M 0755 .libs/sample_group$(soext) $(DESTDIR)$(plugindir)
 
 uninstall:
-       -$(LIBTOOL) --mode=uninstall rm -f $(DESDTDIR)/$(plugindir)/sample_group.la
+       -rm -f $(DESTDIR)$(plugindir)/sample_group$(soext)
 
 check:
 
index 65b7df70919de3999d147aa62763155270a23c87..cbf1a604cd673693d51689a9f57a035ef98f3179 100644 (file)
@@ -68,6 +68,9 @@ libexecdir = @libexecdir@
 datarootdir = @datarootdir@
 localstatedir = @localstatedir@
 
+# File extension for shared objects
+soext = @SOEXT@
+
 # Directory in which to install the sudoers plugin
 plugindir = @PLUGINDIR@
 
@@ -343,7 +346,7 @@ install-doc:
        @LDAP@$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0555 $(srcdir)/sudoers2ldif $(DESTDIR)$(docdir)
 
 install-plugin: sudoers.la install-dirs
-       $(LIBTOOL) --mode=install --quiet $(INSTALL) -b~ sudoers.la $(DESTDIR)$(plugindir)
+       $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 0755 .libs/sudoers$(soext) $(DESTDIR)$(plugindir)
 
 install-sudoers: install-dirs
        $(INSTALL) -d -O $(sudoers_uid) -G $(sudoers_gid) -M 0750 \
@@ -353,7 +356,7 @@ install-sudoers: install-dirs
                sudoers $(DESTDIR)$(sudoersdir)/sudoers
 
 uninstall:
-       -$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(plugindir)/sudoers.la
+       -rm -f $(DESTDIR)$(plugindir)/sudoers$(soext)
        -rm -f $(DESTDIR)$(replaydir)/sudoreplay
        -rm -f $(DESTDIR)$(visudodir)/visudo
        -cmp $(DESTDIR)$(sudoersdir)/sudoers $(srcdir)/sudoers >/dev/null && \