From: Diego Elio Pettenò Date: Wed, 20 Feb 2008 00:00:01 +0000 (+0000) Subject: Replace pamd_mimic_system with a pamd_mimic function that takes as an X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=141025b305eb138be3ba586bb1cd0ede49556f03;p=gentoo.git Replace pamd_mimic_system with a pamd_mimic function that takes as an argument the stack that it should mime. pamd_mimic_system is now a wrapper, which I should deprecated once I'm done with pambase. --- diff --git a/eclass/pam.eclass b/eclass/pam.eclass index 51c58ea1b61c..4a59ed2d2bea 100644 --- a/eclass/pam.eclass +++ b/eclass/pam.eclass @@ -1,7 +1,7 @@ # Copyright 2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later # Author Diego Pettenò -# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.14 2007/11/04 15:00:27 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.15 2008/02/20 00:00:01 flameeyes Exp $ # # This eclass contains functions to install pamd configuration files and # pam modules. @@ -130,25 +130,35 @@ newpammod() { # for the given levels in the /etc/pam.d directory. pamd_mimic_system() { [[ $# -lt 2 ]] && die "pamd_mimic_system requires at least two argments" + pamd_mimic system-auth "$@" +} + +# pamd_mimic [auth levels] +# +# This function creates a pamd file which mimics the given stack +# for the given levels in the /etc/pam.d directory. +pamd_mimic() { + [[ $# -lt 3 ]] && die "pamd_mimic requires at least three argments" if hasq pam ${IUSE} && ! use pam; then return 0; fi dodir /etc/pam.d - pamdfile=${D}/etc/pam.d/$1 - echo -e "# File autogenerated by pamd_mimic_system in pam eclass\n\n" >> \ + pamdfile=${D}/etc/pam.d/$2 + echo -e "# File autogenerated by pamd_mimic in pam eclass\n\n" >> \ $pamdfile + originalstack=$1 authlevels="auth account password session" if has_version '