summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorLars Müller <lmuelle@samba.org>2006-03-21 21:54:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:40 -0500
commit4ba096740ff8773d7108ca24c6af9a47d085fa00 (patch)
tree6d929359ceec6f9eaa4e0dfff22d41696ebb379c /source3
parent906c19faca757561e55d7d5470940535810779d5 (diff)
downloadsamba-4ba096740ff8773d7108ca24c6af9a47d085fa00.tar.gz
samba-4ba096740ff8773d7108ca24c6af9a47d085fa00.tar.bz2
samba-4ba096740ff8773d7108ca24c6af9a47d085fa00.zip
r14631: Add {,un}installpammodules rule and add it to the install rule.
Nothing happens if PAM_MODULES is empty which is our default. The default destination dir is "${LIBDIR}/security". It's possible to overwrite the default with --with-pammodulesdir while calling configure. (This used to be commit 7163c6860549378fa63907048c4eb34fe81835cc)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in21
-rw-r--r--source3/configure.in18
2 files changed, 37 insertions, 2 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 1ed88140f2..edf9548d5e 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -65,6 +65,7 @@ BINDIR = @bindir@
SBINDIR = @sbindir@
ROOTSBINDIR = @rootsbindir@
LIBDIR = @libdir@
+PAMMODULESDIR = @pammodulesdir@
VFSLIBDIR = $(LIBDIR)/vfs
PDBLIBDIR = $(LIBDIR)/pdb
RPCLIBDIR = $(LIBDIR)/rpc
@@ -1412,7 +1413,7 @@ bin/t_snprintf@EXEEXT@: lib/snprintf.c
bin/timelimit@EXEEXT@: script/tests/timelimit.c
$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(DYNEXP) script/tests/timelimit.c
-install: installservers installbin @INSTALL_CIFSMOUNT@ installman installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@
+install: installservers installbin @INSTALL_CIFSMOUNT@ installman installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@ installpammodules
install-everything: install installmodules
@@ -1478,6 +1479,16 @@ installlibmsrpc: installdirs libmsrpc
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) ${prefix}/include
-$(INSTALLCMD) $(srcdir)/include/libmsrpc.h $(DESTDIR)${prefix}/include
+installpammodules: $(PAM_MODULES)
+ @if test "$(PAM_MODULES)"; then \
+ $(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(PAMMODULESDIR); \
+ fi
+ @for module in $(PAM_MODULES); do \
+ echo "Installing module $${module} as $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
+ install -m $(INSTALLPERMS) bin/$${module}.@SHLIBEXT@ \
+ "$(DESTDIR)/$(PAMMODULESDIR)"; \
+ done
+
# Python extensions
PYTHON_OBJS = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) $(RPC_PARSE_OBJ) \
@@ -1534,7 +1545,7 @@ showlayout:
@echo " swatdir: $(SWATDIR)"
-uninstall: uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ uninstallscripts uninstalldat uninstallswat uninstallmodules @UNINSTALL_LIBSMBCLIENT@ @UNINSTALL_LIBMSRPC@
+uninstall: uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ uninstallscripts uninstalldat uninstallswat uninstallmodules @UNINSTALL_LIBSMBCLIENT@ @UNINSTALL_LIBMSRPC@ uninstallpammodules
uninstallman:
@$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
@@ -1578,6 +1589,12 @@ uninstalllibmsrpc: installdirs libmsrpc
-$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libmsrpc.a
-rm -f $(DESTDIR)${prefix}/include/libmsrpc.h
+uninstallpammodules:
+ @for module in $(PAM_MODULES); do \
+ echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
+ rm -f "$(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@"; \
+ done
+
# Toplevel clean files
TOPFILES=dynconfig.o dynconfig.@PICSUFFIX@
diff --git a/source3/configure.in b/source3/configure.in
index a5dc7a483f..079376c6b7 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -29,6 +29,7 @@ test "${mandir}" || mandir="\${prefix}/man"
logfilebase="\${VARDIR}"
privatedir="\${prefix}/private"
test "${libdir}" || libdir="\${prefix}/lib"
+pammodulesdir="\${LIBDIR}/security"
configdir="\${LIBDIR}"
swatdir="\${prefix}/swat"
@@ -176,6 +177,22 @@ AC_ARG_WITH(libdir,
esac])
#################################################
+# set PAM modules directory location
+AC_ARG_WITH(pammodulesdir,
+[ --with-pammodulesdir=DIR Which directory to use for PAM modules ($ac_default_prefix/$libdir/security)],
+[ case "$withval" in
+ yes|no)
+ #
+ # Just in case anybody calls it without argument
+ #
+ AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
+ ;;
+ * )
+ pammodulesdir="$withval"
+ ;;
+ esac])
+
+#################################################
# set man directory location
AC_ARG_WITH(mandir,
[ --with-mandir=DIR Where to put man pages ($mandir)],
@@ -219,6 +236,7 @@ AC_SUBST(swatdir)
AC_SUBST(bindir)
AC_SUBST(sbindir)
AC_SUBST(rootsbindir)
+AC_SUBST(pammodulesdir)
dnl Unique-to-Samba variables we'll be playing with.
AC_SUBST(SHELL)