pam-afs-session-2.5/ 0000755 0001750 0000000 00000000000 11613410002 011335 5 0000000 0000000 pam-afs-session-2.5/pam_afs_session.5 0000644 0001750 0000000 00000046101 11613407774 014544 0000000 0000000 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "PAM_AFS_SESSION 5"
.TH PAM_AFS_SESSION 5 "2011-07-25" "2.5" "pam-afs-session"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
pam_afs_session \- AFS PAG and token PAM module
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 2
\& auth optional pam_afs_session.so
\& session required pam_afs_session.so
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The \s-1AFS\s0 session service module for \s-1PAM\s0, typically installed at
\&\fI/lib/security/pam_afs_session.so\fR, establishes new \s-1AFS\s0 sessions and
obtains \s-1AFS\s0 tokens when a new session is opened for a user. It is a
shared object that is dynamically loaded by the \s-1PAM\s0 subsystem as
necessary, based on the system \s-1PAM\s0 configuration. \s-1PAM\s0 is a system for
plugging in external authentication and session management modules so that
each application doesn't have to know the best way to check user
authentication or create a user session on that system. For details on
how to configure \s-1PAM\s0 on your system, see the \s-1PAM\s0 man page, often \fIpam\fR\|(7).
.PP
This module provides pam_setcred, pam_open_session, and pam_close_session
implementations for \s-1AFS\s0. Because pam_setcred is part of the auth \s-1PAM\s0
group, it also implements a dummy pam_authenticate that always succeeds
(otherwise, it can't provide a pam_setcred).
.PP
Make sure that this module is \s-1NEVER\s0 listed as \f(CW\*(C`sufficient\*(C'\fR or as the only
\&\f(CW\*(C`required\*(C'\fR module in the auth group. Doing so will potentially allow
users to log on without any password. There unfortunately isn't a way to
work around this and still provide pam_setcred without running afoul of a
bug in (at least) Linux \s-1PAM\s0 0.99.7.1 and probably earlier that causes
authentication to fail when the final module in the auth group returns
\&\s-1PAM_IGNORE\s0 and \f(CW\*(C`[default=done]\*(C'\fR was given as the action.
.PP
Here are the actions of this module:
.IP "pam_open_session" 4
.IX Item "pam_open_session"
When a new session is opened, this module will first check to see if \s-1AFS\s0
is running on the system. If not, it will log a message and exit
successfully. If \s-1AFS\s0 is running, it will place the user's session in a
new \s-1PAG\s0 (Process Authentication Group, often implemented as supplemental
groups, which limits user tokens to only processes in that \s-1PAG\s0). It will
then attempt to obtain tokens, either directly if built with the Heimdal
libkafs library and Kerberos support or by running an external \fBaklog\fR
program. If \s-1PAG\s0 creation fails, the module will fail; if obtaining tokens
fails, the module will log a warning but still return success.
.Sp
The module will only attempt to obtain tokens if the environment variable
\&\s-1KRB5CCNAME\s0 is set in the environment, unless otherwise configured (see the
always_aklog option). It will always create a new \s-1PAG\s0, however.
.IP "pam_close_session" 4
.IX Item "pam_close_session"
If and only if pam_open_session successfully obtained \s-1AFS\s0 tokens and \s-1AFS\s0
is still running on the system, pam_close_session will delete the tokens
in the current \s-1PAG\s0 (equivalent to running \fBunlog\fR). To leave the tokens
after session close, set the retain_after_close option.
.IP "pam_setcred" 4
.IX Item "pam_setcred"
When pam_setcred is called with the \s-1PAM_ESTABLISH_CRED\s0 flag, it will do
the same as if pam_open_session was called. When pam_setcred is called
with the \s-1PAM_DELETE_CRED\s0 flag, it will do the same as if pam_close_session
was called. When called with the \s-1PAM_REINITIALIZE_CRED\s0 flag or the
\&\s-1PAM_REFRESH_CRED\s0 flag, it won't create a new \s-1PAG\s0 but instead will only
attempt to get new tokens (still skipping this unless \s-1KRB5CCNAME\s0 is set in
the environment or always_aklog is set).
.PP
This module is primarily intended for use with a Kerberos v5
authentication module. It does not itself do any user authentication; it
cannot, for instance, be used to authenticate users to a \fBkaserver\fR.
While it is intended for use with an \fBaklog\fR that uses Kerberos v5 ticket
caches to obtain tokens, it can be used with any \fBaklog\fR implementation
(always_aklog may have to be set if no Kerberos v5 ticket cache will be
present).
.PP
This module performs no authorization checks and does not hook into
password changes; it only implements the session functions and
pam_setcred.
.SH "CONFIGURATION"
.IX Header "CONFIGURATION"
The \s-1AFS\s0 session \s-1PAM\s0 module supports the following configuration options,
which may be set in the \s-1PAM\s0 configuration as arguments listed after
\&\f(CW\*(C`pam_afs_session.so\*(C'\fR or in the system \fIkrb5.conf\fR.
.PP
Some of them take arguments, in which case the argument will be given
after \f(CW\*(C`=\*(C'\fR. The rest are boolean options. To set a boolean option in the
\&\s-1PAM\s0 configuration, just give the name of the option in the arguments. To
set an option that takes an argument, follow the option name with an equal
sign (\f(CW\*(C`=\*(C'\fR) and the value, with no separating whitespace. Whitespace in
option arguments is not supported in the \s-1PAM\s0 configuration files of most
\&\s-1PAM\s0 implementations.
.PP
To set an option for the \s-1PAM\s0 module in the system \fIkrb5.conf\fR file, put
that option in the [appdefaults] section. The \s-1AFS\s0 session \s-1PAM\s0 module will
look for options either at the top level of the [appdefaults] section or
in a subsection named \f(CW\*(C`pam\-afs\-session\*(C'\fR (currently, realm-specific
configuration is not checked). For example, the following fragment of a
\&\fIkrb5.conf\fR file would set \fIaklog_homedir\fR to true and \fIminimum_uid\fR to
100.
.PP
.Vb 5
\& [appdefaults]
\& aklog_homedir = true
\& pam\-afs\-session = {
\& minimum_uid = 100
\& }
.Ve
.PP
There is no difference to the \s-1PAM\s0 module whether options are specified at
the top level or in a \f(CW\*(C`pam\-afs\-session\*(C'\fR section; the \f(CW\*(C`pam\-afs\-session\*(C'\fR
section is supported in case there are options that should be set for the
\&\s-1PAM\s0 module but not for other applications. For more information on the
syntax of \fIkrb5.conf\fR, see \fIkrb5.conf\fR\|(5).
.PP
If the same option is set in \fIkrb5.conf\fR and in the \s-1PAM\s0 configuration,
the latter takes precedent. Note, however, that due to the configuration
syntax, there's no way to turn off a boolean option in the \s-1PAM\s0
configuration that was turned on in \fIkrb5.conf\fR.
.IP "afs_cells=\fIcell\fR[,\fIcell\fR...]" 4
.IX Item "afs_cells=cell[,cell...]"
Obtain tokens for the listed cells instead of the default local cell. If
more than one cell is listed, try to obtain tokens for each cell. If
specified in \fIkrb5.conf\fR, the cells can be separated by any combination
of spaces and commas; if specified in the \s-1PAM\s0 configuration, they must be
separated by commas.
.Sp
If the \s-1AFS\s0 session \s-1PAM\s0 module is running an external program, this option
is implemented by passing a \fB\-c\fR flag with the cell as its argument for
each listed cell to that program. If aklog_homedir is also set, the \fB\-c\fR
flags and the \fB\-p\fR flag will all be passed to the external program.
.IP "aklog_homedir" 4
.IX Item "aklog_homedir"
Try to obtain the necessary tokens to access the user's home directory.
If the libkafs token-obtaining \s-1API\s0 is used, setting this will cause the
\&\s-1AFS\s0 session \s-1PAM\s0 module to pass the user's home directory into that \s-1API\s0 and
request that the appropriate tokens be obtained. If running an external
\&\fBaklog\fR program, \fBaklog\fR will be called with \fB\-p\fR \fIhome-directory\fR
where \fIhome-directory\fR is the home directory of the local user for which
the session is being opened or refreshed. This generally will tell
\&\fBaklog\fR to check that path, find all \s-1AFS\s0 cells involved in access to that
path, and attempt to obtain tokens for each one. Note that this means
that if the user's home directory is not in \s-1AFS\s0, no tokens will be
obtained.
.Sp
In either case, the user's home directory is obtained via \fIgetpwnam()\fR based
on the username \s-1PAM\s0 says we are authenticating.
.IP "always_aklog" 4
.IX Item "always_aklog"
Normally, the \s-1AFS\s0 session \s-1PAM\s0 module only tries to obtain tokens if
\&\s-1KRB5CCNAME\s0 is set in the \s-1PAM\s0 environment. If this option is set, it will
always attempt to obtain tokens. This is only useful if it is configured
to run an external \fBaklog\fR program.
.Sp
This can be used if your environment doesn't correctly set \s-1KRB5CCNAME\s0 in
the environment for some reason, or if your \fBaklog\fR doesn't rely on a
Kerberos ticket cache to obtain tokens (or can find the cache on its own
via some other means).
.IP "debug" 4
.IX Item "debug"
If this option is set, additional trace information will be logged to
syslog with priority \s-1LOG_DEBUG\s0.
.IP "ignore_root" 4
.IX Item "ignore_root"
If this option is set, the \s-1AFS\s0 session \s-1PAM\s0 module won't take any action
(and will exit successfully) if the account for which the session is being
established is named \f(CW\*(C`root\*(C'\fR.
.IP "kdestroy" 4
.IX Item "kdestroy"
If this option is set and the \s-1AFS\s0 session \s-1PAM\s0 module was built with
Kerberos support, the user's ticket cache will be destroyed after tokens
are obtained successfully. If tokens are not obtained successfully, the
ticket cache will be left intact. Please note that this is not properly a
security feature, since the ticket cache will still be written to disk
between the time the Kerberos \s-1PAM\s0 module authenticates the user and the
time the \s-1AFS\s0 session \s-1PAM\s0 module is run. It can, however, be used to
reduce the window during which Kerberos ticket caches are lying about if
the only use one has for ticket caches is to obtain \s-1AFS\s0 tokens.
.IP "minimum_uid=\fIuid\fR" 4
.IX Item "minimum_uid=uid"
If this option is set, the \s-1AFS\s0 session \s-1PAM\s0 module won't take any action
(and will exit successfully) if the account for which the session is being
established has a \s-1UID\s0 lower than \fIuid\fR.
.IP "nopag" 4
.IX Item "nopag"
If this option is set, no \s-1PAG\s0 will be created. Be careful when using this
option, since it means that the user will inherit a \s-1PAG\s0 from the process
managing the login. If \fBsshd\fR, for instance, is started in a \s-1PAG\s0, every
user who logs in via ssh will be put in the same \s-1PAG\s0 and will share tokens
if this option is used.
.Sp
This is the default on Mac \s-1OS\s0 X, where PAGs are not supported.
.IP "notokens" 4
.IX Item "notokens"
If this option is set, the \s-1AFS\s0 session \s-1PAM\s0 module will only create a \s-1PAG\s0
and not attempt to obtain tokens. Setting this option overrides all other
settings related to acquiring tokens, including always_aklog. If both
nopag and notokens are set, the module essentially does nothing.
.Sp
Setting notokens also implies retain_after_close, meaning that the \s-1AFS\s0
session \s-1PAM\s0 module will also not attempt to delete tokens when the user's
session ends.
.IP "program=\fIpath\fR" 4
.IX Item "program=path"
The path to the \fBaklog\fR program to run. Setting this option tells the
\&\s-1AFS\s0 session \s-1PAM\s0 module to always run an external program to obtain tokens
and never use the libkafs interface, even if the latter is available.
.Sp
You may pass options to this program by separating them with commas (or
spaces or tabs in \fIkrb5.conf\fR or if the configuration syntax of your \s-1PAM\s0
configuration allows this). For example, the setting:
.Sp
.Vb 1
\& program=/usr/bin/aklog,\-noprdb,\-524
.Ve
.Sp
will run \f(CW\*(C`/usr/bin/aklog \-noprdb \-524\*(C'\fR as the program to obtain tokens.
The arguments are passed directly, not parsed by the shell.
.Sp
If this option is not set, the default behavior is to call the libkafs
function to obtain tokens, if available, and otherwise to use a default
path to \fBaklog\fR determined at compile time (the first \fBaklog\fR found on
the compiler's path by default). If no \fBaklog\fR could be found at compile
time and libkafs isn't used, this option must be set.
.IP "retain_after_close" 4
.IX Item "retain_after_close"
If this option is set, pam_close_session will do nothing (successfully)
rather than deleting tokens. This will allow programs started in the
user's \s-1PAG\s0 that are still running when the log out to continue to use the
user's tokens until they expire. Normally, the \s-1AFS\s0 kernel module will
automatically clean up tokens once every process in that \s-1PAG\s0 has
terminated.
.SH "ENVIRONMENT"
.IX Header "ENVIRONMENT"
.IP "\s-1KRB5CCNAME\s0" 4
.IX Item "KRB5CCNAME"
This module looks for \s-1KRB5CCNAME\s0 in the \s-1PAM\s0 environment and by default
does not run \fBaklog\fR if it is not set.
.PP
The entire \s-1PAM\s0 environment is passed to \fBaklog\fR as its environment
(rather than the environment of the process running the \s-1PAM\s0 functions).
.SH "WARNINGS"
.IX Header "WARNINGS"
As mentioned above, this module implements a dummy pam_authenticate
function so that it can provide a pam_setcred function. Never list this
module as \f(CW\*(C`sufficient\*(C'\fR or as the only \f(CW\*(C`required\*(C'\fR module or you may allow
users to log on without a password.
.PP
While spawning an external \fBaklog\fR program, the \s-1AFS\s0 session \s-1PAM\s0 module
resets the \s-1SIGCHLD\s0 signal handler to the default handler while the program
runs and then restores it afterward. This is done to avoid having aklog
interfere with process handling in the calling application, but it means
that there's a race condition that can cause children to be incorrectly
handled if they exit while aklog is running. There is unfortunately no
good solution to this other than building against Heimdal and using the
libkafs interface to obtain tokens instead of an external program.
.PP
To detect whether \s-1AFS\s0 is running on the system, the \s-1AFS\s0 session \s-1PAM\s0 module
temporarily sets a \s-1SIGSYS\s0 handler before attempting an \s-1AFS\s0 system call.
That handler may also modify a static variable. Neither of these should
ideally be done in a \s-1PAM\s0 module, but there is no other good way of
checking for the non-existence of a system call that doesn't crash the
application on some operating systems. The \s-1PAM\s0 module will attempt to
restore the previous \s-1SIGSYS\s0 handler, if any, after the test is done, and
the static variable is used in such a way that running it from multiple
threads shouldn't be an issue, but be aware that the \s-1PAM\s0 module is doing
this behind the back of the application and may interfere with unusual
\&\s-1SIGSYS\s0 handlers or similar application actions.
.SH "NOTES"
.IX Header "NOTES"
When using the libkafs interface to obtain tokens, be sure that it is
configured properly for the type of \s-1AFS\s0 tokens expected at your site. As
of Heimdal 0.7, the default behavior is to contact the krb524 service to
translate Kerberos v5 tickets into Kerberos v4 tickets to use as tokens.
\&\s-1AFS\s0 cells running current server software no longer need this, and if your
site doesn't run the krb524 service, this may break token acquisition.
.PP
Sites running \s-1AFS\s0 servers that understand Kerberos\-v5\-derived tokens
should add configuration like:
.PP
.Vb 5
\& libkafs = {
\& EXAMPLE.ORG = {
\& afs\-use\-524 = no
\& }
\& }
.Ve
.PP
to the [appdefaults] section of their \fIkrb5.conf\fR files to disable use of
the krb524 service. See the Heimdal \fIkafs\fR\|(3) man page for more
information.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIaklog\fR\|(1), \fIkafs\fR\|(3), \fIpam\fR\|(7), \fIsyslog\fR\|(3), \fIunlog\fR\|(1)
pam-afs-session-2.5/m4/ 0000755 0001750 0000000 00000000000 11613410002 011655 5 0000000 0000000 pam-afs-session-2.5/m4/lib-pathname.m4 0000644 0001750 0000000 00000005143 11613407726 014426 0000000 0000000 dnl Determine the library path name.
dnl
dnl Red Hat systems and some other Linux systems use lib64 and lib32 rather
dnl than just lib in some circumstances. This file provides an Autoconf
dnl macro, RRA_SET_LDFLAGS, which given a variable, a prefix, and an optional
dnl suffix, adds -Lprefix/lib, -Lprefix/lib32, or -Lprefix/lib64 to the
dnl variable depending on which directories exist and the size of a long in
dnl the compilation environment. If a suffix is given, a slash and that
dnl suffix will be appended, to allow for adding a subdirectory of the library
dnl directory.
dnl
dnl This file also provides the Autoconf macro RRA_SET_LIBDIR, which sets the
dnl libdir variable to PREFIX/lib{,32,64} as appropriate.
dnl
dnl The canonical version of this file is maintained in the rra-c-util
dnl package, available at .
dnl
dnl Written by Russ Allbery
dnl Copyright 2008, 2009
dnl The Board of Trustees of the Leland Stanford Junior University
dnl
dnl This file is free software; the authors give unlimited permission to copy
dnl and/or distribute it, with or without modifications, as long as this
dnl notice is preserved.
dnl Probe for the alternate library name that we should attempt on this
dnl architecture, given the size of an int, and set rra_lib_arch_name to that
dnl name. Separated out so that it can be AC_REQUIRE'd and not run multiple
dnl times.
dnl
dnl There is an unfortunate abstraction violation here where we assume we know
dnl the cache variable name used by Autoconf. Unfortunately, Autoconf doesn't
dnl provide any other way of getting at that information in shell that I can
dnl see.
AC_DEFUN([_RRA_LIB_ARCH_NAME],
[rra_lib_arch_name=lib
AC_CHECK_SIZEOF([long])
AS_IF([test "$ac_cv_sizeof_long" -eq 4 && test -d /usr/lib32],
[rra_lib_arch_name=lib32],
[AS_IF([test "$ac_cv_sizeof_long" -eq 8 && test -d /usr/lib64],
[rra_lib_arch_name=lib64])])])
dnl Set VARIABLE to -LPREFIX/lib{,32,64} or -LPREFIX/lib{,32,64}/SUFFIX as
dnl appropriate.
AC_DEFUN([RRA_SET_LDFLAGS],
[AC_REQUIRE([_RRA_LIB_ARCH_NAME])
AS_IF([test -d "$2/$rra_lib_arch_name"],
[AS_IF([test x"$3" = x],
[$1="[$]$1 -L$2/${rra_lib_arch_name}"],
[$1="[$]$1 -L$2/${rra_lib_arch_name}/$3"])],
[AS_IF([test x"$3" = x],
[$1="[$]$1 -L$2/lib"],
[$1="[$]$1 -L$2/lib/$3"])])
$1=`echo "[$]$1" | sed -e 's/^ *//'`])
dnl Set libdir to PREFIX/lib{,32,64} as appropriate.
AC_DEFUN([RRA_SET_LIBDIR],
[AC_REQUIRE([_RRA_LIB_ARCH_NAME])
AS_IF([test -d "$1/$rra_lib_arch_name"],
[libdir="$1/${rra_lib_arch_name}"],
[libdir="$1/lib"])])
pam-afs-session-2.5/m4/ltoptions.m4 0000644 0001750 0000000 00000027256 11613407767 014136 0000000 0000000 # Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 7 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
# ------------------------------------------
m4_define([_LT_MANGLE_OPTION],
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
# ---------------------------------------
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
# saved as a flag.
m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option `$2'])])[]dnl
])
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
# ------------------------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
m4_define([_LT_IF_OPTION],
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
# -------------------------------------------------------
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
# are set.
m4_define([_LT_UNLESS_OPTIONS],
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
[m4_define([$0_found])])])[]dnl
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
])[]dnl
])
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
# ----------------------------------------
# OPTION-LIST is a space-separated list of Libtool options associated
# with MACRO-NAME. If any OPTION has a matching handler declared with
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
# the unknown option and exit.
m4_defun([_LT_SET_OPTIONS],
[# Set options
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[_LT_SET_OPTION([$1], _LT_Option)])
m4_if([$1],[LT_INIT],[
dnl
dnl Simply set some default values (i.e off) if boolean options were not
dnl specified:
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
])
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
])
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl `shared' nor `disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
])
])# _LT_SET_OPTIONS
## --------------------------------- ##
## Macros to handle LT_INIT options. ##
## --------------------------------- ##
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
# -----------------------------------------
m4_define([_LT_MANGLE_DEFUN],
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
# -----------------------------------------------
m4_define([LT_OPTION_DEFINE],
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
])# LT_OPTION_DEFINE
# dlopen
# ------
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
])
AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
# win32-dll
# ---------
# Declare package support for building win32 dll's.
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac
test -z "$AS" && AS=as
_LT_DECL([], [AS], [1], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the `shared' and
# `disable-shared' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
_LT_DECL([build_libtool_libs], [enable_shared], [0],
[Whether or not to build shared libraries])
])# _LT_ENABLE_SHARED
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
# Old names:
AC_DEFUN([AC_ENABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
])
AC_DEFUN([AC_DISABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], [disable-shared])
])
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the `static' and
# `disable-static' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
_LT_DECL([build_old_libs], [enable_static], [0],
[Whether or not to build static libraries])
])# _LT_ENABLE_STATIC
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
# Old names:
AC_DEFUN([AC_ENABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
])
AC_DEFUN([AC_DISABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], [disable-static])
])
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the `fast-install'
# and `disable-fast-install' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
_LT_DECL([fast_install], [enable_fast_install], [0],
[Whether or not to optimize for fast installation])dnl
])# _LT_ENABLE_FAST_INSTALL
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
# Old names:
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
# LT_INIT options.
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[pic_mode="$withval"],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
# Old name:
AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
## ----------------- ##
## LTDL_INIT Options ##
## ----------------- ##
m4_define([_LTDL_MODE], [])
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
[m4_define([_LTDL_MODE], [nonrecursive])])
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
[m4_define([_LTDL_MODE], [recursive])])
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
[m4_define([_LTDL_MODE], [subproject])])
m4_define([_LTDL_TYPE], [])
LT_OPTION_DEFINE([LTDL_INIT], [installable],
[m4_define([_LTDL_TYPE], [installable])])
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
[m4_define([_LTDL_TYPE], [convenience])])
pam-afs-session-2.5/m4/pam-const.m4 0000644 0001750 0000000 00000003164 11613407726 013767 0000000 0000000 dnl Determine whether PAM uses const in prototypes.
dnl
dnl Linux marks several PAM arguments const, including the argument to
dnl pam_get_item and some arguments to conversation functions, which Solaris
dnl doesn't. This test tries to determine which style is in use to select
dnl whether to declare variables const in order to avoid compiler warnings.
dnl
dnl Since this is just for compiler warnings, it's not horribly important if
dnl we guess wrong. This test is ugly, but it seems to work.
dnl
dnl Contributed by Markus Moeller.
dnl
dnl The canonical version of this file is maintained in the rra-c-util
dnl package, available at .
dnl
dnl Copyright 2007 Russ Allbery
dnl Copyright 2007, 2008 Markus Moeller
dnl
dnl This file is free software; the authors give unlimited permission to copy
dnl and/or distribute it, with or without modifications, as long as this
dnl notice is preserved.
dnl Source used by RRA_HEADER_PAM_CONST.
AC_DEFUN([_RRA_HEADER_PAM_CONST_SOURCE],
[#ifdef HAVE_SECURITY_PAM_APPL_H
# include
#else
# include
#endif
])
AC_DEFUN([RRA_HEADER_PAM_CONST],
[AC_CACHE_CHECK([whether PAM prefers const], [rra_cv_header_pam_const],
[AC_EGREP_CPP([const void \*\* *_?item], _RRA_HEADER_PAM_CONST_SOURCE(),
[rra_cv_header_pam_const=yes], [rra_cv_header_pam_const=no])])
AS_IF([test x"$rra_cv_header_pam_const" = xyes],
[rra_header_pam_const=const], [rra_header_pam_const=])
AC_DEFINE_UNQUOTED([PAM_CONST], [$rra_header_pam_const],
[Define to const if PAM uses const in pam_get_item, empty otherwise.])])
pam-afs-session-2.5/m4/lt~obsolete.m4 0000644 0001750 0000000 00000013756 11613407767 014455 0000000 0000000 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 5 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
#
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
pam-afs-session-2.5/m4/snprintf.m4 0000644 0001750 0000000 00000003727 11613407726 013736 0000000 0000000 dnl Test for a working C99 snprintf.
dnl
dnl Check for a working snprintf. Some systems have an snprintf that doesn't
dnl nul-terminate if the buffer isn't large enough. Others return -1 if the
dnl string doesn't fit into the buffer instead of returning the number of
dnl characters that would have been formatted. Still others don't support
dnl NULL as the buffer argument (just to get a count of the formatted length).
dnl
dnl Provides RRA_FUNC_SNPRINTF, which adds snprintf.o to LIBOBJS unless a
dnl fully working snprintf is found.
dnl
dnl The canonical version of this file is maintained in the rra-c-util
dnl package, available at .
dnl
dnl Written by Russ Allbery
dnl Copyright 2006, 2008, 2009
dnl The Board of Trustees of the Leland Stanford Junior University
dnl
dnl This file is free software; the authors give unlimited permission to copy
dnl and/or distribute it, with or without modifications, as long as this
dnl notice is preserved.
dnl Source used by RRA_FUNC_SNPRINTF.
AC_DEFUN([_RRA_FUNC_SNPRINTF_SOURCE], [[
#include
#include
char buf[2];
int
test(char *format, ...)
{
va_list args;
int count;
va_start(args, format);
count = vsnprintf(buf, sizeof buf, format, args);
va_end(args);
return count;
}
int
main()
{
return ((test("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0'
&& snprintf(NULL, 0, "%s", "abcd") == 4) ? 0 : 1);
}
]])
dnl The user-callable test.
AC_DEFUN([RRA_FUNC_SNPRINTF],
[AC_CACHE_CHECK([for working snprintf], [rra_cv_func_snprintf_works],
[AC_RUN_IFELSE([AC_LANG_SOURCE([_RRA_FUNC_SNPRINTF_SOURCE])],
[rra_cv_func_snprintf_works=yes],
[rra_cv_func_snprintf_works=no],
[rra_cv_func_snprintf_works=no])])
AS_IF([test x"$rra_cv_func_snprintf_works" = xyes],
[AC_DEFINE([HAVE_SNPRINTF], 1,
[Define if your system has a working snprintf function.])],
[AC_LIBOBJ([snprintf])])])
pam-afs-session-2.5/m4/lib-depends.m4 0000644 0001750 0000000 00000002405 11613407726 014251 0000000 0000000 dnl Provides option to change library probes.
dnl
dnl This file provides RRA_ENABLE_REDUCED_DEPENDS, which adds the configure
dnl option --enable-reduced-depends to request that library probes assume
dnl shared libraries are in use and dependencies of libraries should not be
dnl probed. If this option is given, the shell variable rra_reduced_depends
dnl is set to true; otherwise, it is set to false.
dnl
dnl This macro doesn't do much but is defined separately so that other macros
dnl can require it with AC_REQUIRE.
dnl
dnl The canonical version of this file is maintained in the rra-c-util
dnl package, available at .
dnl
dnl Written by Russ Allbery
dnl Copyright 2005, 2006, 2007
dnl The Board of Trustees of the Leland Stanford Junior University
dnl
dnl This file is free software; the authors give unlimited permission to copy
dnl and/or distribute it, with or without modifications, as long as this
dnl notice is preserved.
AC_DEFUN([RRA_ENABLE_REDUCED_DEPENDS],
[rra_reduced_depends=false
AC_ARG_ENABLE([reduced-depends],
[AS_HELP_STRING([--enable-reduced-depends],
[Try to minimize shared library dependencies])],
[AS_IF([test x"$enableval" = xyes], [rra_reduced_depends=true])])])
pam-afs-session-2.5/m4/kafs.m4 0000644 0001750 0000000 00000024322 11613407726 013011 0000000 0000000 dnl Test for a libkafs library or replacement.
dnl
dnl Check for a working libkafs library, and if not present, check how we can
dnl simulate what one would do ourselves, adding the appropriate things to
dnl LIBOBJS. Provides the --with-libkafs configure option specify a
dnl non-standard path to libkafs or (as --without-libkafs) to force use of the
dnl internal implementation; --with-libkafs-include and --with-libkafs-lib to
dnl specify paths at a more granular level; and --with-afs,
dnl --with-afs-include, and --with-afs-lib configure options to specify the
dnl location of the AFS libraries.
dnl
dnl Provides the macro RRA_LIB_KAFS and sets the substition variables
dnl KAFS_CPPFLAGS, KAFS_LDFLAGS, and KAFS_LIBS. If Kerberos libraries may be
dnl needed, LIBS and LDFLAGS must already be set appropriately before calling
dnl this. Also provides RRA_LIB_KAFS_SWITCH to set CPPFLAGS, LDFLAGS, and
dnl LIBS to include libkafs, saving the current values first, and
dnl RRA_LIB_KAFS_RESTORE to restore those settings to before the last
dnl RRA_LIB_KFS_SWITCH.
dnl
dnl Sets HAVE_K_HASAFS if the k_hasafs function was found in a libkafs
dnl library. Sets HAVE_LSETPAG if building against the AFS libraries and the
dnl lsetpag function is present. Sets HAVE_KAFS_REPLACEMENT if building the
dnl replacement kafs library. Defines HAVE_KAFS_DARWIN8, HAVE_KAFS_DARWIN10,
dnl HAVE_KAFS_LINUX, HAVE_KAFS_SOLARIS, or HAVE_KAFS_SYSCALL as appropriate if
dnl the replacement kafs library is needed.
dnl
dnl If building a replacement library is needed, sets rra_build_kafs to true.
dnl Otherwise, sets it to false. This is intended for use with an Automake
dnl conditional, but the Automake conditional isn't set directly by this macro
dnl since AFS support may be optional in the larger package.
dnl
dnl Depends on RRA_SET_LDFLAGS.
dnl
dnl The canonical version of this file is maintained in the rra-c-util
dnl package, available at .
dnl
dnl Written by Russ Allbery
dnl Copyright 2008, 2009, 2010
dnl The Board of Trustees of the Leland Stanford Junior University
dnl
dnl This file is free software; the authors give unlimited permission to copy
dnl and/or distribute it, with or without modifications, as long as this
dnl notice is preserved.
dnl Save the current CPPFLAGS, LDFLAGS, and LIBS settings and switch to
dnl versions that include the libkafs flags. Used as a wrapper, with
dnl RRA_LIB_KAFS_RESTORE, around tests.
AC_DEFUN([RRA_LIB_KAFS_SWITCH],
[rra_kafs_save_CPPFLAGS="$CPPFLAGS"
rra_kafs_save_LDFLAGS="$LDFLAGS"
rra_kafs_save_LIBS="$LIBS"
CPPFLAGS="$KAFS_CPPFLAGS $CPPFLAGS"
LDFLAGS="$KAFS_LDFLAGS $LDFLAGS"
LIBS="$KAFS_LIBS $LIBS"])
dnl Restore CPPFLAGS, LDFLAGS, and LIBS to their previous values (before
dnl RRA_LIB_KAFS_SWITCH was called).
AC_DEFUN([RRA_LIB_KAFS_RESTORE],
[CPPFLAGS="$rra_kafs_save_CPPFLAGS"
LDFLAGS="$rra_kafs_save_LDFLAGS"
LIBS="$rra_kafs_save_LIBS"])
dnl Set KAFS_CPPFLAGS and KAFS_LDFLAGS based on rra_kafs_root,
dnl rra_kafs_libdir, rra_kafs_includedir, rra_afs_root, rra_afs_libdir, and
dnl rra_afs_includedir.
AC_DEFUN([_RRA_LIB_KAFS_PATHS],
[KAFS_LDFLAGS=
AS_IF([test x"$rra_kafs_libdir" != x],
[KAFS_LDFLAGS="-L$rra_kafs_libdir"],
[AS_IF([test x"$rra_kafs_root" != x],
[RRA_SET_LDFLAGS([KAFS_LDFLAGS], [$rra_kafs_root])])])
AS_IF([test x"$rra_kafs_includedir" != x],
[KAFS_CPPFLAGS="-I$rra_kafs_includedir"],
[AS_IF([test x"$rra_kafs_root" != x],
[AS_IF([test x"$rra_kafs_root" != x/usr],
[KAFS_CPPFLAGS="-I${rra_kafs_root}/include"])])])
AS_IF([test x"$rra_afs_libdir" != x],
[KAFS_LDFLAGS="$KAFS_LDFLAGS -L$rra_afs_libdir"],
[AS_IF([test x"$rra_afs_root" != x],
[RRA_SET_LDFLAGS([KAFS_LDFLAGS], [$rra_afs_root])])
RRA_SET_LDFLAGS([KAFS_LDFLAGS], [$rra_afs_root], [afs])])
AS_IF([test x"$rra_afs_includedir" != x],
[KAFS_CPPFLAGS="-I$rra_afs_includedir"],
[AS_IF([test x"$rra_afs_root" != x],
[AS_IF([test x"$rra_afs_root" != x/usr],
[KAFS_CPPFLAGS="$KAFS_CPPFLAGS -I${rra_afs_root}/include"])])])])
dnl Probe for lsetpag in the AFS libraries. This is required on AIX and IRIX
dnl since we can't use the regular syscall interface there.
AC_DEFUN([_RRA_LIB_KAFS_LSETPAG],
[RRA_LIB_KAFS_SWITCH
LIBS=
AC_SEARCH_LIBS([pthread_getspecific], [pthread])
AC_SEARCH_LIBS([res_search], [resolv], [],
[AC_SEARCH_LIBS([__res_search], [resolv])])
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([socket], [socket], [],
[AC_CHECK_LIB([nsl], [socket], [LIBS="-lnsl -lsocket $LIBS"], [],
[-lsocket])])
rra_kafs_extra="$LIBS"
LIBS="$rra_kafs_save_LIBS"
AC_CHECK_LIB([afsauthent], [lsetpag],
[KAFS_LIBS="-lafsauthent -lafsrpc $rra_kafs_extra"
AC_DEFINE([HAVE_LSETPAG], [1],
[Define to 1 if you have the OpenAFS lsetpag function.])],
[AC_CHECK_LIB([sys], [lsetpag],
[KAFS_LIBS="-lsys $rra_kafs_extra"
AC_DEFINE([HAVE_LSETPAG], [1],
[Define to 1 if you have the OpenAFS lsetpag function.])], [],
[$rra_kafs_extra])],
[-lafsrpc $rra_kafs_extra])
AC_CHECK_HEADERS([afs/afssyscalls.h])
RRA_LIB_KAFS_RESTORE])
dnl The public entry point. Sets up the --with options and then decides what
dnl to do based on the system. Either RRA_LIB_KRB5 or RRA_LIB_KRB5_OPTIONAL
dnl must be called before this function or the Heimdal libkafs may not be
dnl available.
AC_DEFUN([RRA_LIB_KAFS],
[AC_REQUIRE([AC_CANONICAL_HOST])
rra_libkafs=true
rra_build_kafs=false
KAFS_CPPFLAGS=
KAFS_LDFLAGS=
KAFS_LIBS=
AC_SUBST([KAFS_CPPFLAGS])
AC_SUBST([KAFS_LDFLAGS])
AC_SUBST([KAFS_LIBS])
dnl In addition to the normal path-finding options, support --without-libkafs
dnl to force always using the internal AFS syscall code.
AC_ARG_WITH([libkafs],
AC_HELP_STRING([--with-libkafs=DIR],
[Location of kafs headers and libraries]),
[AS_IF([test x"$withval" = xno],
[rra_libkafs=false],
[AS_IF([test x"$withval" != xyes], [rra_krb5_root="$withval"])])])
AC_ARG_WITH([libkafs-include],
[AS_HELP_STRING([--with-libkafs-include=DIR],
[Location of kafs headers])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_kafs_includedir="$withval"])])
AC_ARG_WITH([libkafs-lib],
[AS_HELP_STRING([--with-libkafs-lib=DIR],
[Location of kafs libraries])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_kafs_libdir="$withval"])])
dnl The location of the AFS headers and libraries. We may not use these
dnl results, but configure always includes the prompt, so always handle them.
dnl This should probably be in a separate macro file.
AC_ARG_WITH([afs],
[AC_HELP_STRING([--with-afs=DIR],
[Location of AFS headers and libraries])],
[AS_IF([test x"$withval" != xno && test x"$withval" != xyes],
[rra_afs_root="$withval"])])
AC_ARG_WITH([afs-include],
[AS_HELP_STRING([--with-afs-include=DIR],
[Location of Kerberos v5 headers])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_afs_includedir="$withval"])])
AC_ARG_WITH([afs-lib],
[AS_HELP_STRING([--with-afs-lib=DIR],
[Location of Kerberos v5 libraries])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_afs_libdir="$withval"])])
dnl If we may use the system libkafs, see if we can find one. Enable the
dnl Kerberos libraries if we found any, in case libkafs depends on Kerberos.
AC_CHECK_HEADERS([sys/ioccom.h])
AS_IF([test x"$rra_libkafs" != xfalse],
[_RRA_LIB_KAFS_PATHS
AS_IF([test x"$rra_use_kerberos" = xtrue],
[RRA_LIB_KRB5_SWITCH])
RRA_LIB_KAFS_SWITCH
AC_CHECK_LIB([kafs], [k_hasafs],
[KAFS_LIBS="-lkafs"
AC_CHECK_HEADERS([kafs.h])],
[AC_CHECK_LIB([kopenafs], [k_hasafs],
[KAFS_LIBS="-lkopenafs"
AC_CHECK_HEADERS([kopenafs.h])],
[rra_libkafs=false])])
RRA_LIB_KAFS_RESTORE
RRA_LIB_KAFS_SWITCH
AC_CHECK_FUNCS([k_pioctl])
AC_REPLACE_FUNCS([k_haspag])
RRA_LIB_KAFS_RESTORE
AS_IF([test x"$rra_use_kerberos" = xtrue],
[RRA_LIB_KRB5_RESTORE])])
dnl If we found a libkafs, we have k_hasafs. Set the appropriate
dnl preprocessor define. Otherwise, we'll use our portability layer.
AS_IF([test x"$rra_libkafs" = xtrue],
[AC_DEFINE([HAVE_K_HASAFS], 1,
[Define to 1 if you have the k_hasafs function.])],
[AC_LIBOBJ([k_haspag])
AS_CASE([$host],
[[*-apple-darwin[89]*]],
[rra_build_kafs=true
AC_DEFINE([HAVE_KAFS_REPLACEMENT], [1],
[Define to 1 if the libkafs replacement is built.])
AC_DEFINE([HAVE_KAFS_DARWIN8], [1],
[Define to 1 to use the Mac OS X 10.4 /dev interface.])],
[*-apple-darwin1*],
[rra_build_kafs=true
AC_DEFINE([HAVE_KAFS_REPLACEMENT], [1],
[Define to 1 if the libkafs replacement is built.])
AC_DEFINE([HAVE_KAFS_DARWIN10], [1],
[Define to 1 to use the Mac OS X 10.6 /dev interface.])],
[*-aix*|*-irix*],
[_RRA_LIB_KAFS_LSETPAG],
[*-linux*],
[rra_build_kafs=true
AC_DEFINE([HAVE_KAFS_REPLACEMENT], [1],
[Define to 1 if the libkafs replacement is built.])
AC_DEFINE([HAVE_KAFS_LINUX], [1],
[Define to 1 to use the Linux AFS /proc interface.])],
[[*-solaris2.1[12345678]*]],
[rra_build_kafs=true
AC_DEFINE([HAVE_KAFS_REPLACEMENT], [1],
[Define to 1 if the libkafs replacement is built.])
AC_DEFINE([HAVE_KAFS_SOLARIS], [1],
[Define to 1 to use the Solaris 11 /dev interface.])
AC_DEFINE([_REENTRANT], [1],
[Define to 1 on Solaris for threaded errno handling.])],
[*],
[rra_build_kafs=true
_RRA_LIB_KAFS_PATHS
RRA_LIB_KAFS_SWITCH
AC_CHECK_HEADERS([afs/param.h], [],
[AC_MSG_ERROR([need afs/param.h to build libkafs replacement])])
RRA_LIB_KAFS_RESTORE
AC_DEFINE([HAVE_KAFS_REPLACEMENT], [1],
[Define to 1 if the libkafs replacement is built.])
AC_DEFINE([HAVE_KAFS_SYSCALL], [1],
[Define to 1 to use the AFS syscall interface.])
AC_DEFINE([_REENTRANT], [1],
[Define to 1 on Solaris for threaded errno handling.])])])])
pam-afs-session-2.5/m4/ltsugar.m4 0000644 0001750 0000000 00000010424 11613407767 013551 0000000 0000000 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])
pam-afs-session-2.5/m4/krb5.m4 0000644 0001750 0000000 00000031573 11613407726 012736 0000000 0000000 dnl Find the compiler and linker flags for Kerberos v5.
dnl
dnl Finds the compiler and linker flags for linking with Kerberos v5
dnl libraries. Provides the --with-krb5, --with-krb5-include, and
dnl --with-krb5-lib configure options to specify non-standard paths to the
dnl Kerberos libraries. Uses krb5-config where available unless reduced
dnl dependencies is requested.
dnl
dnl Provides the macro RRA_LIB_KRB5 and sets the substitution variables
dnl KRB5_CPPFLAGS, KRB5_LDFLAGS, and KRB5_LIBS. Also provides
dnl RRA_LIB_KRB5_SWITCH to set CPPFLAGS, LDFLAGS, and LIBS to include the
dnl Kerberos libraries, saving the current values first, and
dnl RRA_LIB_KRB5_RESTORE to restore those settings to before the last
dnl RRA_LIB_KRB5_SWITCH.
dnl
dnl If KRB5_CPPFLAGS, KRB5_LDFLAGS, or KRB5_LIBS are set before calling these
dnl macros, their values will be added to whatever the macros discover.
dnl
dnl Provides the RRA_LIB_KRB5_OPTIONAL macro, which should be used if Kerberos
dnl support is optional. This macro will still always set the substitution
dnl variables, but they'll be empty unless --with-krb5 is given. Also,
dnl HAVE_KERBEROS will be defined if --with-krb5 is given and
dnl $rra_use_kerberos will be set to "true".
dnl
dnl Sets the Automake conditional KRB5_USES_COM_ERR saying whether we use
dnl com_err, since if we're also linking with AFS libraries, we may have to
dnl change library ordering in that case.
dnl
dnl Depends on RRA_ENABLE_REDUCED_DEPENDS and RRA_SET_LDFLAGS.
dnl
dnl Also provides RRA_FUNC_KRB5_GET_INIT_CREDS_OPT_FREE_ARGS, which checks
dnl whether krb5_get_init_creds_opt_free takes one argument or two. Defines
dnl HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_2_ARGS if it takes two arguments.
dnl
dnl The canonical version of this file is maintained in the rra-c-util
dnl package, available at .
dnl
dnl Written by Russ Allbery
dnl Copyright 2005, 2006, 2007, 2008, 2009, 2010
dnl The Board of Trustees of the Leland Stanford Junior University
dnl
dnl This file is free software; the authors give unlimited permission to copy
dnl and/or distribute it, with or without modifications, as long as this
dnl notice is preserved.
dnl Save the current CPPFLAGS, LDFLAGS, and LIBS settings and switch to
dnl versions that include the Kerberos v5 flags. Used as a wrapper, with
dnl RRA_LIB_KRB5_RESTORE, around tests.
AC_DEFUN([RRA_LIB_KRB5_SWITCH],
[rra_krb5_save_CPPFLAGS="$CPPFLAGS"
rra_krb5_save_LDFLAGS="$LDFLAGS"
rra_krb5_save_LIBS="$LIBS"
CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS"
LDFLAGS="$KRB5_LDFLAGS $LDFLAGS"
LIBS="$KRB5_LIBS $LIBS"])
dnl Restore CPPFLAGS, LDFLAGS, and LIBS to their previous values (before
dnl RRA_LIB_KRB5_SWITCH was called).
AC_DEFUN([RRA_LIB_KRB5_RESTORE],
[CPPFLAGS="$rra_krb5_save_CPPFLAGS"
LDFLAGS="$rra_krb5_save_LDFLAGS"
LIBS="$rra_krb5_save_LIBS"])
dnl Set KRB5_CPPFLAGS and KRB5_LDFLAGS based on rra_krb5_root,
dnl rra_krb5_libdir, and rra_krb5_includedir.
AC_DEFUN([_RRA_LIB_KRB5_PATHS],
[AS_IF([test x"$rra_krb5_libdir" != x],
[KRB5_LDFLAGS="-L$rra_krb5_libdir"],
[AS_IF([test x"$rra_krb5_root" != x],
[RRA_SET_LDFLAGS([KRB5_LDFLAGS], [$rra_krb5_root])])])
AS_IF([test x"$rra_krb5_includedir" != x],
[KRB5_CPPFLAGS="-I$rra_krb5_includedir"],
[AS_IF([test x"$rra_krb5_root" != x],
[AS_IF([test x"$rra_krb5_root" != x/usr],
[KRB5_CPPFLAGS="-I${rra_krb5_root}/include"])])])])
dnl Does the appropriate library checks for reduced-dependency Kerberos v5
dnl linkage. The single argument, if true, says to fail if Kerberos could not
dnl be found.
AC_DEFUN([_RRA_LIB_KRB5_REDUCED],
[RRA_LIB_KRB5_SWITCH
AC_CHECK_LIB([krb5], [krb5_init_context], [KRB5_LIBS="-lkrb5"],
[AS_IF([test x"$1" = xtrue],
[AC_MSG_ERROR([cannot find usable Kerberos v5 library])])])
LIBS="$KRB5_LIBS $LIBS"
AC_CHECK_FUNCS([krb5_get_error_message],
[AC_CHECK_FUNCS([krb5_free_error_message])],
[AC_CHECK_FUNCS([krb5_get_error_string], [],
[AC_CHECK_FUNCS([krb5_get_err_txt], [],
[AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
[KRB5_LIBS="$KRB5_LIBS -lksvc"
AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1])
AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
[#include ])],
[AC_CHECK_LIB([com_err], [com_err],
[KRB5_LIBS="$KRB5_LIBS -lcom_err"],
[AC_MSG_ERROR([cannot find usable com_err library])])
AC_CHECK_HEADERS([et/com_err.h])])])])])
RRA_LIB_KRB5_RESTORE])
dnl Does the appropriate library checks for Kerberos v5 linkage when we don't
dnl have krb5-config or reduced dependencies. The single argument, if true,
dnl says to fail if Kerberos could not be found.
AC_DEFUN([_RRA_LIB_KRB5_MANUAL],
[RRA_LIB_KRB5_SWITCH
rra_krb5_extra=
LIBS=
AC_SEARCH_LIBS([res_search], [resolv], [],
[AC_SEARCH_LIBS([__res_search], [resolv])])
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([socket], [socket], [],
[AC_CHECK_LIB([nsl], [socket], [LIBS="-lnsl -lsocket $LIBS"], [],
[-lsocket])])
AC_SEARCH_LIBS([crypt], [crypt])
AC_SEARCH_LIBS([rk_simple_execve], [roken])
rra_krb5_extra="$LIBS"
LIBS="$rra_krb5_save_LIBS"
AC_CHECK_LIB([krb5], [krb5_init_context],
[KRB5_LIBS="-lkrb5 -lasn1 -lcom_err -lcrypto $rra_krb5_extra"],
[AC_CHECK_LIB([krb5support], [krb5int_getspecific],
[rra_krb5_extra="-lkrb5support $rra_krb5_extra"],
[AC_CHECK_LIB([pthreads], [pthread_setspecific],
[rra_krb5_pthread="-lpthreads"],
[AC_CHECK_LIB([pthread], [pthread_setspecific],
[rra_krb5_pthread="-lpthread"])])
AC_CHECK_LIB([krb5support], [krb5int_setspecific],
[rra_krb5_extra="-lkrb5support $rra_krb5_extra $rra_krb5_pthread"],
[], [$rra_krb5_pthread $rra_krb5_extra])],
[$rra_krb5_extra])
AC_CHECK_LIB([com_err], [error_message],
[rra_krb5_extra="-lcom_err $rra_krb5_extra"], [], [$rra_krb5_extra])
AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
[rra_krb5_extra="-lksvc $rra_krb5_extra"], [], [$rra_krb5_extra])
AC_CHECK_LIB([k5crypto], [krb5int_hash_md5],
[rra_krb5_extra="-lk5crypto $rra_krb5_extra"], [], [$rra_krb5_extra])
AC_CHECK_LIB([k5profile], [profile_get_values],
[rra_krb5_extra="-lk5profile $rra_krb5_extra"], [], [$rra_krb5_extra])
AC_CHECK_LIB([krb5], [krb5_cc_default],
[KRB5_LIBS="-lkrb5 $rra_krb5_extra"],
[AS_IF([test x"$1" = xtrue],
[AC_MSG_ERROR([cannot find usable Kerberos v5 library])])],
[$rra_krb5_extra])],
[-lasn1 -lcom_err -lcrypto $rra_krb5_extra])
LIBS="$KRB5_LIBS $LIBS"
AC_CHECK_FUNCS([krb5_get_error_message],
[AC_CHECK_FUNCS([krb5_free_error_message])],
[AC_CHECK_FUNCS([krb5_get_error_string], [],
[AC_CHECK_FUNCS([krb5_get_err_txt], [],
[AC_CHECK_FUNCS([krb5_svc_get_msg],
[AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
[#include ])],
[AC_CHECK_HEADERS([et/com_err.h])])])])])
RRA_LIB_KRB5_RESTORE])
dnl Sanity-check the results of krb5-config and be sure we can really link a
dnl Kerberos program. If that fails, clear KRB5_CPPFLAGS and KRB5_LIBS so
dnl that we know we don't have usable flags and fall back on the manual
dnl check.
AC_DEFUN([_RRA_LIB_KRB5_CHECK],
[RRA_LIB_KRB5_SWITCH
AC_CHECK_FUNC([krb5_init_context],
[RRA_LIB_KRB5_RESTORE],
[RRA_LIB_KRB5_RESTORE
KRB5_CPPFLAGS=
KRB5_LIBS=
_RRA_LIB_KRB5_PATHS
_RRA_LIB_KRB5_MANUAL([$1])])])
dnl The core of the library checking, shared between RRA_LIB_KRB5 and
dnl RRA_LIB_KRB5_OPTIONAL. The single argument, if "true", says to fail if
dnl Kerberos could not be found.
AC_DEFUN([_RRA_LIB_KRB5_INTERNAL],
[AC_REQUIRE([RRA_ENABLE_REDUCED_DEPENDS])
AS_IF([test x"$rra_reduced_depends" = xtrue],
[_RRA_LIB_KRB5_PATHS
_RRA_LIB_KRB5_REDUCED([$1])],
[AC_ARG_VAR([KRB5_CONFIG], [Path to krb5-config])
AS_IF([test x"$rra_krb5_root" != x && test -z "$KRB5_CONFIG"],
[AS_IF([test -x "${rra_krb5_root}/bin/krb5-config"],
[KRB5_CONFIG="${rra_krb5_root}/bin/krb5-config"])],
[AC_PATH_PROG([KRB5_CONFIG], [krb5-config], [],
[${PATH}:/usr/kerberos/bin])])
AS_IF([test x"$KRB5_CONFIG" != x && test -x "$KRB5_CONFIG"],
[AC_CACHE_CHECK([for krb5 support in krb5-config],
[rra_cv_lib_krb5_config],
[AS_IF(["$KRB5_CONFIG" 2>&1 | grep krb5 >/dev/null 2>&1],
[rra_cv_lib_krb5_config=yes],
[rra_cv_lib_krb5_config=no])])
AS_IF([test x"$rra_cv_lib_krb5_config" = xyes],
[KRB5_CPPFLAGS=`"$KRB5_CONFIG" --cflags krb5 2>/dev/null`
KRB5_LIBS=`"$KRB5_CONFIG" --libs krb5 2>/dev/null`],
[KRB5_CPPFLAGS=`"$KRB5_CONFIG" --cflags 2>/dev/null`
KRB5_LIBS=`"$KRB5_CONFIG" --libs 2>/dev/null`])
KRB5_CPPFLAGS=`echo "$KRB5_CPPFLAGS" | sed 's%-I/usr/include ?%%'`
_RRA_LIB_KRB5_CHECK([$1])
RRA_LIB_KRB5_SWITCH
AC_CHECK_FUNCS([krb5_get_error_message],
[AC_CHECK_FUNCS([krb5_free_error_message])],
[AC_CHECK_FUNCS([krb5_get_error_string], [],
[AC_CHECK_FUNCS([krb5_get_err_txt], [],
[AC_CHECK_FUNCS([krb5_svc_get_msg],
[AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
[#include ])],
[AC_CHECK_HEADERS([et/com_err.h])])])])])
RRA_LIB_KRB5_RESTORE],
[_RRA_LIB_KRB5_PATHS
_RRA_LIB_KRB5_MANUAL([$1])])])
rra_krb5_uses_com_err=false
case "$LIBS" in
*-lcom_err*)
rra_krb5_uses_com_err=true
;;
esac
AM_CONDITIONAL([KRB5_USES_COM_ERR], [test x"$rra_krb5_uses_com_err" = xtrue])])
dnl The main macro for packages with mandatory Kerberos support.
AC_DEFUN([RRA_LIB_KRB5],
[rra_krb5_root=
rra_krb5_libdir=
rra_krb5_includedir=
rra_use_kerberos=true
AC_SUBST([KRB5_CPPFLAGS])
AC_SUBST([KRB5_LDFLAGS])
AC_SUBST([KRB5_LIBS])
AC_ARG_WITH([krb5],
[AS_HELP_STRING([--with-krb5=DIR],
[Location of Kerberos v5 headers and libraries])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_krb5_root="$withval"])])
AC_ARG_WITH([krb5-include],
[AS_HELP_STRING([--with-krb5-include=DIR],
[Location of Kerberos v5 headers])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_krb5_includedir="$withval"])])
AC_ARG_WITH([krb5-lib],
[AS_HELP_STRING([--with-krb5-lib=DIR],
[Location of Kerberos v5 libraries])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_krb5_libdir="$withval"])])
_RRA_LIB_KRB5_INTERNAL([true])])
dnl The main macro for packages with optional Kerberos support.
AC_DEFUN([RRA_LIB_KRB5_OPTIONAL],
[rra_krb5_root=
rra_krb5_libdir=
rra_krb5_includedir=
rra_use_kerberos=
AC_SUBST([KRB5_CPPFLAGS])
AC_SUBST([KRB5_LDFLAGS])
AC_SUBST([KRB5_LIBS])
AC_ARG_WITH([krb5],
[AS_HELP_STRING([--with-krb5@<:@=DIR@:>@],
[Location of Kerberos v5 headers and libraries])],
[AS_IF([test x"$withval" = xno],
[rra_use_kerberos=false],
[AS_IF([test x"$withval" != xyes], [rra_krb5_root="$withval"])
rra_use_kerberos=true])])
AC_ARG_WITH([krb5-include],
[AS_HELP_STRING([--with-krb5-include=DIR],
[Location of Kerberos v5 headers])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_krb5_includedir="$withval"])])
AC_ARG_WITH([krb5-lib],
[AS_HELP_STRING([--with-krb5-lib=DIR],
[Location of Kerberos v5 libraries])],
[AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
[rra_krb5_libdir="$withval"])])
AS_IF([test x"$rra_use_kerberos" != xfalse],
[AS_IF([test x"$rra_use_kerberos" = xtrue],
[_RRA_LIB_KRB5_INTERNAL([true])],
[_RRA_LIB_KRB5_INTERNAL([false])])],
[AM_CONDITIONAL([KRB5_USES_COM_ERR], [false])])
AS_IF([test x"$KRB5_LIBS" != x],
[AC_DEFINE([HAVE_KERBEROS], 1, [Define to enable Kerberos features.])])])
dnl Check whether krb5_get_init_creds_opt_free takes one argument or two.
dnl Early Heimdal used to take a single argument. Defines
dnl HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_2_ARGS if it takes two arguments.
dnl
dnl Should be called with RRA_LIB_KRB5_SWITCH active.
AC_DEFUN([RRA_FUNC_KRB5_GET_INIT_CREDS_OPT_FREE_ARGS],
[AC_CACHE_CHECK([if krb5_get_init_creds_opt_free takes two arguments],
[rra_cv_func_krb5_get_init_creds_opt_free_args],
[AC_TRY_COMPILE([#include ],
[krb5_get_init_creds_opt *opts; krb5_context c;
krb5_get_init_creds_opt_free(c, opts);],
[rra_cv_func_krb5_get_init_creds_opt_free_args=yes],
[rra_cv_func_krb5_get_init_creds_opt_free_args=no])])
AS_IF([test $rra_cv_func_krb5_get_init_creds_opt_free_args = yes],
[AC_DEFINE([HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_2_ARGS], 1,
[Define if krb5_get_init_creds_opt_free takes two arguments.])])])
pam-afs-session-2.5/m4/ld-version.m4 0000644 0001750 0000000 00000002647 11613407726 014155 0000000 0000000 dnl Check whether the linker supports --version-script.
dnl
dnl Probes whether the linker supports --version-script with a simple version
dnl script that only defines a single version. Sets the Automake conditional
dnl HAVE_LD_VERSION_SCRIPT based on whether it is supported.
dnl
dnl The canonical version of this file is maintained in the rra-c-util
dnl package, available at .
dnl
dnl Written by Russ Allbery
dnl Based on the gnulib ld-version-script macro from Simon Josefsson
dnl Copyright 2010
dnl The Board of Trustees of the Leland Stanford Junior University
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl
dnl This file is free software; the authors give unlimited permission to copy
dnl and/or distribute it, with or without modifications, as long as this
dnl notice is preserved.
AC_DEFUN([RRA_LD_VERSION_SCRIPT],
[AC_CACHE_CHECK([if -Wl,--version-script works], [rra_cv_ld_version_script],
[save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
cat > conftest.map <