is deleted or corrupted. It can be disabled with a new volume
option "nocnidcache".
* NEW: afpd: IPv6 support
+* UPD: afpd: try to install PAM config that pulls in system|common auth
Changes in 2.0.5
================
## Makefile.am for config/
+SUBDIRS = pam
+
SUFFIXES = .tmpl .
GENFILES = afpd.conf AppleVolumes.default
TMPLFILES = afpd.conf.tmpl AppleVolumes.default.tmpl
CONFFILES = AppleVolumes.system \
atalkd.conf netatalk.conf papd.conf
-PAMFILES = netatalk.pamd
OVERWRITE_CONFIG = @OVERWRITE_CONFIG@
-EXTRA_DIST = $(CONFFILES) $(TMPLFILES) $(PAMFILES)
+EXTRA_DIST = $(CONFFILES) $(TMPLFILES)
CLEANFILES = $(GENFILES)
bootscript=netamin \
./setup.sh > /dev/null; \
fi
-
-#
-# pluggable authentication modules support
-#
-
-if USE_PAM
-
-pamdir = @PAMDIR@/etc/pam.d
-
-install-data-local: install-config-files install-webmin $(PAMFILES)
- $(mkinstalldirs) $(DESTDIR)$(pamdir)
- if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pamdir)/netatalk; then \
- echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pamdir)/netatalk"; \
- $(INSTALL_DATA) netatalk.pamd $(DESTDIR)$(pamdir)/netatalk || echo "WARNING: Can't install PAM files"; \
- else \
- echo "not overwriting $(DESTDIR)$(pamdir)/netatalk"; \
- fi;
-
-uninstall-local:
- echo rm -f $(DESTDIR)$(pamdir)/netatalk; \
- rm -f $(DESTDIR)$(pamdir)/netatalk; \
- for f in $(CONFFILES) $(GENFILES); do \
- echo rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
- rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
- done
-
-else
-
-install-data-local: install-config-files install-webmin
-
-uninstall-local:
- for f in $(CONFFILES) $(GENFILES); do \
- echo rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
- rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
- done
-
-endif
+++ /dev/null
-#%PAM-1.0
-auth required pam_unix.so
-account required pam_unix.so
-#password required pam_cracklib.so
-#password required pam_unix.so use_authtok
-session required pam_unix.so
--- /dev/null
+Makefile
+Makefile.in
+netatalk.pam
\ No newline at end of file
--- /dev/null
+## Makefile for distrib/pam/
+
+SUFFIXES = .tmpl .
+pamdir = @PAMDIR@/etc/pam.d
+EXTRA_DIST = netatalk.pam.tmpl
+noinst_SCRIPTS = netatalk.pam
+CLEANFILES = netatalk.pam
+
+.tmpl:
+ sed -e "s,[@]PAM_DIRECTIVE[@],${PAM_DIRECTIVE},g" \
+ -e "s,[@]PAM_AUTH[@],${PAM_AUTH}," \
+ -e "s,[@]PAM_ACCOUNT[@],${PAM_ACCOUNT}," \
+ -e "s,[@]PAM_PASSWORD[@],${PAM_PASSWORD}," \
+ -e "s,[@]PAM_SESSION[@],${PAM_SESSION}," \
+ <$< >$@
+
+if USE_PAM
+install-data-local: netatalk.pam
+ $(mkinstalldirs) $(DESTDIR)$(pamdir)
+ if test "x$(OVERWRITE_CONFIG)" = "xyes" -o ! -f $(DESTDIR)$(pamdir)/netatalk; then \
+ echo "$(INSTALL_DATA) $$f $(DESTDIR)$(pamdir)/netatalk"; \
+ $(INSTALL_DATA) netatalk.pam $(DESTDIR)$(pamdir)/netatalk || echo "WARNING: Can't install PAM files"; \
+ else \
+ echo "not overwriting $(DESTDIR)$(pamdir)/netatalk"; \
+ fi;
+
+uninstall-local:
+ echo rm -f $(DESTDIR)$(pamdir)/netatalk; \
+ rm -f $(DESTDIR)$(pamdir)/netatalk; \
+ for f in $(CONFFILES) $(GENFILES); do \
+ echo rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
+ rm -f $(DESTDIR)$(pkgconfdir)/$$f; \
+ done
+endif
--- /dev/null
+#%PAM-1.0
+auth @PAM_DIRECTIVE@ @PAM_AUTH@
+account @PAM_DIRECTIVE@ @PAM_ACCOUNT@
+password @PAM_DIRECTIVE@ @PAM_PASSWORD@
+session @PAM_DIRECTIVE@ @PAM_SESSION@
-dnl $Id: configure.in,v 1.229 2009-11-23 10:20:15 franklahm Exp $
+dnl $Id: configure.in,v 1.230 2009-11-23 18:29:50 franklahm Exp $
dnl configure.in for netatalk
AC_INIT(etc/afpd/main.c)
bin/psorder/Makefile
bin/uniconv/Makefile
config/Makefile
+ config/pam/Makefile
contrib/Makefile
contrib/acltests/Makefile
contrib/macusers/Makefile
-dnl $Id: pam-check.m4,v 1.3 2005-04-28 20:50:05 bfernhomberg Exp $
+dnl $Id: pam-check.m4,v 1.4 2009-11-23 18:29:50 franklahm Exp $
dnl PAM finding macro
AC_DEFUN([AC_PATH_PAM], [
if test x"$pam_found" = "xyes" -a "x$PAMDIR" = "xNONE"; then
AC_MSG_WARN([PAM support can be compiled, but the install location for the netatalk.pamd file could not be determined. Either install this file by hand or specify the install path.])
netatalk_cv_install_pam=no
+ else
+ dnl Check for some system|common auth file
+ AC_MSG_CHECKING([for includable common PAM config])
+ pampath="${PAMDIR}etc/pam.d"
+ dnl Debian/SuSE
+ if test -f "$pampath/common-auth" ; then
+ PAM_DIRECTIVE=include
+ PAM_AUTH=common-auth
+ PAM_ACCOUNT=common-account
+ PAM_PASSWORD=common-password
+ PAM_SESSION=common-session
+ dnl RHEL/FC
+ elif test -f "$pampath/system-auth" ; then
+ PAM_DIRECTIVE=include
+ PAM_AUTH=system-auth
+ PAM_ACCOUNT=system-auth
+ PAM_PASSWORD=system-auth
+ PAM_SESSION=system-auth
+ else
+ PAM_DIRECTIVE=required
+ PAM_AUTH=pam_unix.so
+ PAM_ACCOUNT=pam_unix.so
+ PAM_PASSWORD="pam_unix.so use_authtok"
+ PAM_SESSION=pam_unix.so
+ fi
+
+ if test "x$PAM_DIRECTIVE" != "xrequired" ; then
+ AC_MSG_RESULT([yes ($PAM_DIRECTIVE $PAM_AUTH)])
+ else
+ AC_MSG_RESULT([no (using defaut pam_unix.so)])
+ fi
fi
AC_MSG_CHECKING([whether to enable PAM support])
AC_SUBST(PAMDIR)
AC_SUBST(PAM_CFLAGS)
AC_SUBST(PAM_LIBS)
+ AC_SUBST(PAM_DIRECTIVE)
+ AC_SUBST(PAM_AUTH)
+ AC_SUBST(PAM_ACCOUNT)
+ AC_SUBST(PAM_PASSWORD)
+ AC_SUBST(PAM_SESSION)
])