/[gentoo-x86]/eclass/pam.eclass
Gentoo

Diff of /eclass/pam.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.5
1# Copyright 2004 Gentoo Foundation 1# Copyright 2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License, v2 or later 2# Distributed under the terms of the GNU General Public License, v2 or later
3# Author Diego Pettenò <flameeyes@gentoo.org> 3# Author Diego Pettenò <flameeyes@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.3 2005/05/20 15:54:34 flameeyes Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/pam.eclass,v 1.5 2005/06/07 11:33:39 flameeyes Exp $
5# 5#
6# This eclass contains functions to install pamd configuration files and 6# This eclass contains functions to install pamd configuration files and
7# pam modules. 7# pam modules.
8 8
9inherit multilib 9inherit multilib
47 if hasq pam ${IUSE} && ! use pam; then 47 if hasq pam ${IUSE} && ! use pam; then
48 return 0; 48 return 0;
49 fi 49 fi
50 50
51 INSDESTTREE=/etc/security/$1 \ 51 INSDESTTREE=/etc/security/$1 \
52 shift
53 doins "$@" || die "failed to install $@" 52 doins "${@:2}" || die "failed to install ${@:2}"
54} 53}
55 54
56# newpamsecurity <section> <old name> <new name> 55# newpamsecurity <section> <old name> <new name>
57# 56#
58# Installs the config file <old name> as <new name> in /etc/security/<section>/ 57# Installs the config file <old name> as <new name> in /etc/security/<section>/
69 68
70# getpam_mod_dir 69# getpam_mod_dir
71# 70#
72# Returns the pam modules' directory for current implementation 71# Returns the pam modules' directory for current implementation
73getpam_mod_dir() { 72getpam_mod_dir() {
74 if has_version sys-libs/pam; then 73 if has_version sys-libs/pam || has_version sys-libs/openpam; then
75 PAM_MOD_DIR=/$(get_libdir)/security 74 PAM_MOD_DIR=/$(get_libdir)/security
76 elif has_version sys-libs/openpam; then 75 elif use ppc-macos; then
76 # OSX looks there for pam modules
77 PAM_MOD_DIR=/usr/$(get_libdir) 77 PAM_MOD_DIR=/usr/lib/pam
78 else 78 else
79 # Unable to find PAM implementation... defaulting 79 # Unable to find PAM implementation... defaulting
80 PAM_MOD_DIR=/$(get_libdir)/security 80 PAM_MOD_DIR=/$(get_libdir)/security
81 fi 81 fi
82 82
125 125
126 dodir /etc/pam.d 126 dodir /etc/pam.d
127 pamdfile=${D}/etc/pam.d/$1 127 pamdfile=${D}/etc/pam.d/$1
128 echo -e "# File autogenerated by pamd_mimic_system in pam eclass\n\n" >> \ 128 echo -e "# File autogenerated by pamd_mimic_system in pam eclass\n\n" >> \
129 $pamdfile 129 $pamdfile
130 130
131 authlevels="auth account password session" 131 authlevels="auth account password session"
132 132
133 shift 133 shift
134 134
135 while [[ -n $1 ]]; do 135 while [[ -n $1 ]]; do

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20