default.defs
.freezemake
.filelist
-include
\ No newline at end of file
+include
+config.status
+config.log
+config.cache
+_pam_aconf.h
+Make.Rules
TODO:
- - autoconf the modules?
- sanitize use of md5 throughout distribution.. Make a static
library for helping to develop modules that contains it and other
stuff. Also add sha-1 and ripemd-160 digest algorithms.
- do we still need to remove openlog/closelog from modules..?
- auth and acct support in pam_cracklib, "yes, I know the password
you just typed was valid, I just don't think it was very strong..."
+ - add in the pam_cap and pam_netid modules
+
+====================================================================
+Note, as of release 0.73, all checkins should be accompanied with a
+Bug ID. The bug IDs relate to sourceforge IDs.. You can query the
+related bug description with the following URL:
+
+ http://sourceforge.net/bugs/?func=detailbug&bug_id=XXXXX&group_id=6663
+
+Where you should replace XXXXX with a bug-id.
+====================================================================
0.73: please submit patches for this section with actual code/doc
patches!
-Planning to include:
-
- - some autoconf support and other outstanding changes from Jan..
- - some outstanding changes from Ben
- - add in the pam_cap and pam_netid modules
+* comment fix describing fail_delay callback in _pam_types.h (Bug
+ 112646 - agmorgan)
+* "likeauth" fix for pam_unix and pam_pwdb which (Bug 113596 - agmorgan)
+* fix for pam_unix (support.c) to avoid segfault with NULL password
+ (Bug 113238 - vorlon)
+* fix to pam_unix_passwd: try repeatedly to get a lock on the password
+ file, instead of failing immediately (Bug 108845 - fix vorlon)
+* fix to pam_shells: logged information was not formatted correctly
+ (extra comma) (Bug 111491 - fix vorlon)
+* fix for C++ application support (Bug 111645 - fix agmorgan)
+* fix for typo in pam_client.h (Bug 111648 - fix agmorgan)
+* removal of -lpam from pam_mkhomedir Makefile (Bug 116380 - fix agmorgan)
+* autoconf support [Task ID 15788, Bug ID 108297 - agmorgan with help!]
+ - bugfix for libpamc.h include file [Bug ID 117476 - agmorgan]
+ - bugfix for pam_filter.h inclusion [Bug ID 117474 - agmorgan]
0.72: Mon Dec 13 22:41:11 PST 1999
##
## $Id$
##
-##
+
+## Note, ideally I would prefer it if this top level makefile did
+## not get created by autoconf. As I find typing 'make' and relying
+## on it to take care of all dependencies much more friendly than
+## the multi-stage autoconf+make and also worry about updates to
+## configure.in not getting propagated down the tree. (AGM) [I realise
+## that this may not prove possible, but at least I tried.. Sigh.]
+
+ifeq ($(shell test \! -f Make.Rules || echo yes),yes)
+ include Make.Rules
+endif
+
+THINGSTOMAKE = modules libpam libpamc libpam_misc doc examples
+
+all: $(THINGSTOMAKE)
+
+prep:
+ rm -f security
+ ln -sf . security
+
+clean:
+ if [ ! -f Make.Rules ]; then touch Make.Rules ; fi
+ for i in $(THINGSTOMAKE) ; do $(MAKE) -C $$i clean ; done
+ rm -f security *~ *.orig *.rej #*#
+
+distclean: clean
+ rm -f Make.Rules _pam_aconf.h
+ rm -f config.status config.cache config.log core
+
+maintainer-clean: distclean
+ @echo files should be ok for packaging now.
+
+# NB _pam_aconf.h.in changes will remake this too
+Make.Rules: configure Make.Rules.in _pam_aconf.h.in
+ @echo XXX - not sure how to preserve past configure options..
+ @echo XXX - so not attempting to. Feel free to run ./configure
+ @echo XXX - by hand, with the options you want.
+ ./configure
+
+configure: configure.in
+ @$(MAKE) distclean
+ @echo
+ @echo You do not appear to have a ./configure file.
+ @echo Please run autoconf, and then ./configure [..options..]
+ @echo
+ @exit 1
+
+$(THINGSTOMAKE): _pam_aconf.h prep
+ $(MAKE) -C $@ all
+
+install: _pam_aconf.h prep
+ $(MKDIR) $(FAKEROOT)$(INCLUDED)
+ $(INSTALL) -m 444 security/_pam_aconf.h $(FAKEROOT)$(INCLUDED)
+ for x in $(THINGSTOMAKE) ; do make -C $$x install ; done
+
+remove:
+ rm -f $(FAKEROOT)$(INCLUDED)/_pam_aconf.h
+ for x in $(THINGSTOMAKE) ; do make -C $$x remove ; done
+
+## =================
+
+ifdef LEGACY_OLD_MAKEFILE
# major and minor numbers of this release
MAJOR_REL=0
chmod 400 .filelist
$(MAKE) check
(cat .filelist ; echo $(RELNAME)/conf/.md5sum) | (cd .. ; tar -cz -f$(DISTFILE) -T-)
+
+endif # LEGACY_OLD_MAKEFILE
Thanks for downloading Linux-PAM.
---------------------------------------------------------------------
-Before you begin:
-
- * This distribution requires GNU's Make
- * It requires GNU's C-compiler: gcc (and 'ld')
- * it also requires the GNU shell: bash
- * some of the modules require the presence of libpwdb see redhat
- * two modules have some need for libcrack too..
-
---------------------------------------------------------------------
-[
-Zeroth (optional) thing to do: check the detatched "pgp" signature for
-this distribution file, it should be signed by
-
-Type Bits/KeyID Date User ID
-pub 1024/2A398175 1996/11/17 Andrew G. Morgan <morgan@linux.kernel.org>
-]
-
-First thing to do (I assume you have successfully unpacked it!) is to
-run:
-
- make check [ requires md5sum to be present ]
-
-This will also check that the distribution has arrived intact. [
-Later, If you change some things, running this command from this
-directory will show you what files you have altered. ]
-
-If you choose to get and install the RCS files that accompany this
-release, you may also run
-
- make RCScheck
-
-from this directory.
-
-Next, you should check the symbolic link
-
- .../Linux-PAM-X.YY/default.defs
-
-points to the file that best describes your system. The various *.defs
-files that are included in this distribution are to be found in the
-directory:
-
- .../Linux-PAM-X.YY/defs/
-
-This should configure the distribution to compile on your system. The
-default is the version I use for maintaining the distribution. [If you
-don't find one that suits your needs, please try to create one, email
-it to me and I will include it in a future release.]
-
-If you are running an ELF based Linux system you should be able to
-compile the distribution straight from the box. If you are running an
-a.out based system, then some of the functionality of Linux-PAM will
-be unavailable to you. Instead, you must switch the DYNAMIC variables
-*off* in your "defs" file: comment out the DYNAMIC and DYNAMIC_LIBPAM
-defines and uncomment the STATIC and STATIC_LIBPAM defines. NOTE, for
-ELF based systems, almost any combination of these four definitions is
-legal... If you have ELF, I recommend the default however.
-
-Second, try to compile it. Use the following command in *this*
-directory:
-
- make
-
-[ or 'make all' if you prefer ]. The first time you type make, it is
-likely to complain. This is to remind you to remove any libraries from
-previous versions of the distribution that are likely to confuse this
-make... Type 'make' again.
-
-Before you do the third thing. You should think about whether you want
-the default configuration scripts to be installed or not. If you have
-a working PAM based system you probably do *not* want this.. Whatever,
-before Linux-PAM installs the default scripts you will be prompted as
-to whether it is a good idea. Be sure to say NO if you are worried!
-** You have been warned. **
-
-Third, to install the stuff you need to be root. Do the following:
-
- su -c "make install"
-
-If everything has worked as intended there should now be
-
- some executables in ./bin/
- some filters for pam_filter in /usr/sbin/pam_filter/
- some configuration files:
- /etc/pam.conf
- /etc/security/*.conf
- libpam_misc.a (static library) in /usr/lib/
-
-In addition:
-
- if dynamically linked:
-
- libpam.so.XXX (shared library) in /usr/lib/
- libpam_misc.so.XXX (shared library) in /usr/lib/
- pam_*.so (modules) in /usr/lib/security/
-
- if statically linked:
-
- libpam.a (static library) in /usr/lib/
-
-[These are the default directories that I use. Your own system may
-differ as specified in your XXX.defs file.]
-
NOTES:
-* The documentation, what there is of it, is in ./doc. I am only
-including the sgml format source-files. But try to make .ps files
-available from the above http address. To locally use these sgml files
-you should have linuxdoc-sgml installed. Sorry, but I'm conserving net
-bandwidth by only including sources!
+This is the evolving autoconf branch for Linux-PAM. It is supposed to
+be equivalent to Linux-PAM-0.72.
-* The source for each module is to be found in ./modules/XXX. If you
-want to add a new one, make a directory like XXX for it. Add the name
-(XXX) to MODDIRS in ./modules/Makefile and hopefully it will become
-part of the overall make. Note, the Makefile in ./modules/ is now
-smart enough to check if the directory is there before it changes into
-it; If you want to start working on a module, send me its name and I
-will add it to the "official" Makefile.. This way, you should be able
-to insert your developing module into any new release, and not have to
-worry at first about letting it out to the public. This may also give
-other people some idea about whether a module is currently being
-worked on or not.
+How to use it is as follows:
-* Currently, you have to 'make' binaries from this directory. 'make
-clean', however, works in any directory that has a Makefile.
+ ./configure --help | less
+ ./configure <your-options>
+ make
-* Also, you can 'make remove' (as root) from *this* directory and it
-will delete the various installed files dotted around the system. THIS
-IS A VERY BAD IDEA IF YOUR SYSTEM DEPENDS ON PAM TO WORK!!!
+ Note, this is all experimental so you may not want to do this one..(?)
-* 'make sterile' does 'make remove' and then 'make extraclean', this
-might be required if you are alternating your choice of
-STATIC(_LIBPAM) and DYNAMIC(_LIBPAM) compilation. SEE COMMENT IN
-UPPERCASE IN PARAGRAPH ABOVE!!!!
+ make install
-Best wishes
+Please report problems to me:
Andrew Morgan
-
-Email bugs/comments to: the Linux-PAM list <pam-list@redhat.com>
-or me <morgan@linux.kernel.org>
-
-To see about joining the mailing list, send the following email:
---------------------------------
-To: pam-list-request@redhat.com
-Subject: help
-<empty text>
---------------------------------
-
-Additionally, some Linux-PAM files have been known to be found at one
-or more of the following places (they are not always the most up to
-date...):
-
-http://www.redhat.com/linux-info/pam/
-
-ftp://bach.cis.temple.edu/pub/People/Alex/private/PAM
-ftp://ftp.redhat.com/pub/misc/
-ftp://linux.nrao.edu/pub/linux/ALPHA/PAM/
-ftp://tsx-11.mit.edu/pub/linux/ALPHA/PAM/
+<morgan@kernel.org>
+<agmorgan@users.sourceforge.net>
### $Id$
-TXTER=sgml2txt
-HTMLER=sgml2html
-# older distributions use, sgml2ps
-# newer distributions than the one I use (AGM :^) need the following line:
-#PSER=sgml2latex -o ps
-# until I upgrade this is the default
-PSER=sgml2latex -p
+include ../Make.Rules
+
+# These two should probably be moved into autoconf...
+DOCDIR=/usr/doc/Linux-PAM
+MANDIR=/usr/man
+
+#######################################################
FILES=pam pam_appl pam_modules
FSRCS=pam.sgml pam_appl.sgml pam_modules.sgml
htmls: $(HTMLS)
$(HTMLS) : $(FSRCS)
+ifeq ($(HAVE_SGML2HTML),yes)
@for i in $(FILES) ; do \
if [ ! -f "html/$$i.html" ] || [ "$$i.sgml" -nt "html/$$i.html" ]; \
then \
- cd html ; $(HTMLER) ../$$i ; \
+ cd html ; sgml2html ../$$i ; \
if [ $$? -ne 0 ]; then exit 1 ; fi ; \
cd .. ; \
fi ; \
done
+else
+ @echo XXX - you do not have the sgml2html binary installed
+endif
texts: $(TEXTS)
$(TEXTS) : $(FSRCS)
+ifeq ($(HAVE_SGML2TXT),yes)
@for i in $(FILES) ; do \
if [ ! -f "txts/$$i.txt" ] \
|| [ "$$i.sgml" -nt "txts/$$i.txt" ]; then \
- cd txts ; $(TXTER) ../$$i ; cd .. ; \
+ cd txts ; sgml2txt ../$$i ; cd .. ; \
fi ; \
done
+else
+ @echo XXX - you do not have the sgml2txt binary installed
+endif
postscript: $(PSFILES)
$(PSFILES): $(FSRCS)
+ifneq ($(PSER),)
@for i in $(FILES) ; do \
if [ ! -f "ps/$$i.ps" ] || [ "$$i.sgml" -nt "ps/$$i.ps" ]; then \
cd ps ; $(PSER) ../$$i ; cd .. ; \
fi ; \
done
+else
+ @echo XXX - neither sgml2ps nor sgml2latex binaries are installed
+endif
-pam.sgml: pam_source.sgml MODULES-SGML
- @sed -e '/^<!\-\- insert\-file MODULES\-SGML \-\->/r MODULES-SGML' pam_source.sgml > pam.sgml
+pam.sgml: pam_source.sgml MODULES-SGML CREDITS
+ @sed -e '/^<!\-\- insert\-file MODULES\-SGML \-\->/r MODULES-SGML' pam_source.sgml | sed -e '/^<!\-\- insert\-file CREDITS \-\->/r CREDITS' > pam.sgml
MODULES-SGML: $(MODULES)
@echo 'Building module text from files in modules/*.sgml'
extraclean: clean
-DOCDIR=/usr/doc/Linux-PAM
-MANDIR=/usr/man
+remove:
+ cd man && for file in *.3 ; do \
+ rm -f $(FAKEROOT)$(MANDIR)/man3/$$file ; \
+ done
+ cd man && for file in *.8 ; do \
+ rm -f $(FAKEROOT)$(MANDIR)/man8/$$file ; \
+ done
+ cd txts && for file in *.txt; do \
+ rm -f $(FAKEROOT)$(DOCDIR)/text/$$file ; \
+ done
+ cd ps && for file in *.ps; do \
+ rm -f $(FAKEROOT)$(DOCDIR)/ps/$$file ; \
+ done
+ cd html && for file in *.html; do \
+ rm -f $(FAKEROOT)$(DOCDIR)/html/$$file ; \
+ done
+
install: all
- mkdir -p $(FAKEROOT)$(DOCDIR)/{html,ps,text}
+ifeq ($(HAVE_SGML2TXT),yes)
+ mkdir -p $(FAKEROOT)$(DOCDIR)/text
for file in txts/*.txt; do \
- install -o root -g root -m 644 $$file $(FAKEROOT)$(DOCDIR)/text ; \
+ install -m 644 $$file $(FAKEROOT)$(DOCDIR)/text ; \
done
+endif
+ifneq ($(PSER),)
+ mkdir -p $(FAKEROOT)$(DOCDIR)/ps
for file in ps/*.ps; do \
- install -o root -g root -m 644 $$file $(FAKEROOT)$(DOCDIR)/ps ; \
+ install -m 644 $$file $(FAKEROOT)$(DOCDIR)/ps ; \
done
+endif
+ifeq ($(HAVE_SGML2HTML),yes)
+ mkdir -p $(FAKEROOT)$(DOCDIR)/html
for file in html/*.html; do \
- install -o root -g root -m 644 $$file $(FAKEROOT)$(DOCDIR)/html ; \
+ install -m 644 $$file $(FAKEROOT)$(DOCDIR)/html ; \
done
+endif
mkdir -p $(FAKEROOT)$(MANDIR)/man{3,8}
for file in man/*.3 ; do \
- install -o root -g root -m 644 $$file $(FAKEROOT)$(MANDIR)/man3 ; \
+ install -m 644 $$file $(FAKEROOT)$(MANDIR)/man3 ; \
done
for file in man/*.8 ; do \
- install -o root -g root -m 644 $$file $(FAKEROOT)$(MANDIR)/man8 ; \
+ install -m 644 $$file $(FAKEROOT)$(MANDIR)/man8 ; \
done
clean:
rm -f html/pam*.html
rm -f man/*~
rm -f $(TEXTS)
- rm -f $(PSFILES)
+ rm -f $(PSFILES) ps/missfont.log
rm -f MODULES-SGML pam.sgml
<article>
<title>The Linux-PAM System Administrators' Guide
-<author>Andrew G. Morgan, <tt>morgan@linux.kernel.org</tt>
-<date>DRAFT v0.71 1999/11/8
+<author>Andrew G. Morgan, <tt>morgan@kernel.org</tt>
+<date>DRAFT v0.73 2000/11/03
<abstract>
This manual documents what a system-administrator needs to know about
the <bf>Linux-PAM</bf> library. It covers the correct syntax of the
<sect>Author/acknowledgments
<p>
-This document was written by Andrew G. Morgan (morgan@linux.kernel.org)
+This document was written by Andrew G. Morgan (morgan@kernel.org)
with many contributions from
-<!-- insert credits here -->
-<!--
- an sgml list of people to credit for their contributions to Linux-PAM
- $Id$
- -->
-Chris Adams,
-Peter Allgeyer,
-Tim Baverstock,
-Tim Berger,
-Craig S. Bell,
-Derrick J. Brashear,
-Ben Buxton,
-Seth Chaiklin,
-Oliver Crow,
-Chris Dent,
-Marc Ewing,
-Cristian Gafton,
-Emmanuel Galanos,
-Brad M. Garcia,
-Eric Hester,
-Roger Hu,
-Eric Jacksch,
-Michael K. Johnson,
-David Kinchlea,
-Olaf Kirch,
-Marcin Korzonek,
-Stephen Langasek,
-Nicolai Langfeldt,
-Elliot Lee,
-Luke Kenneth Casson Leighton,
-Al Longyear,
-Ingo Luetkebohle,
-Marek Michalkiewicz,
-Robert Milkowski,
-Aleph One,
-Martin Pool,
-Sean Reifschneider,
-Jan Rekorajski,
-Erik Troan,
-Theodore Ts'o,
-Jeff Uphoff,
-Myles Uyema,
-Savochkin Andrey Vladimirovich,
-Ronald Wahl,
-David Wood,
-John Wilmes,
-Joseph S. D. Yao
-and
-Alex O. Yuriev.
+<!-- insert-file CREDITS -->
<p>
Thanks are also due to Sun Microsystems, especially to Vipin Samar and
-pam*.ps
\ No newline at end of file
+pam*.ps
# $Id$
#
-dummy:
-
- @echo "*** This is not a top level Makefile!"
+include ../Make.Rules
PROGS = blank xsh check_user
SRCS = blank.c xsh.c check_user.c
+PROGSUID =
-# have removed the following pair since they no longer conform to
-# any recognized conventions: vpass test
-# ditto: vpass.c test.c
+CFLAGS += -I../libpam_misc/inlcude -I../libpamc/include
-PROGSUID =
+LOADLIBES = -L../libpam -L../libpamc -L../libpam_misc -lpam -lpam_misc
all: $(PROGS)
xsh: xsh.o
$(CC) $(CFLAGS) -o $@ $< $(LOADLIBES)
+clean:
+ rm -f *.a *.so *.o *~ $(PROGS) $(PROGSUID)
+ rm -f *.a *.out *.o *.so
+
+# note, the programs are test programs, they should not be
+# installed on your system!
+
install: all
if [ -n "$(PROGS)" ]; then cp $(PROGS) ../bin ; fi
if [ -n "$(PROGSUID)" ]; then \
- $(INSTALL) -m 4555 -o root -g bin $(PROGSUID) ../bin ; fi
-
-clean:
- rm -f *.a *.so *.o *~ $(PROGS) $(PROGSUID)
+ $(INSTALL) -m 4555 $(PROGSUID) ../bin ; fi
remove:
cd ../bin ; rm -f $(PROGS) $(PROGSUID)
-
-extraclean: clean
- rm -f *.a *.out *.o *.so
for x in $(PROGS) $(PROGSUID) ; do rm -f ../bin/$$x ; done
/*
* $Id$
- *
- * $Log$
- * Revision 1.1.1.1 2000/06/20 22:11:13 agmorgan
- * Imported 0.72 Linux-PAM sources
- *
- * Revision 1.2 1999/11/08 05:39:53 morgan
- * removed void main def which was making gcc complain
- *
- * Revision 1.1.1.1 1998/07/12 05:17:14 morgan
- * Linux PAM sources pre-0.66
- *
- * Revision 1.4 1996/11/10 21:09:45 morgan
- * no gcc warnings
- *
- * Revision 1.3 1996/07/07 23:53:36 morgan
- * added support for non standard pam_fail_delay
- *
- * Revision 1.2 1996/05/02 04:44:48 morgan
- * moved conversaation to a libmisc routine.
- *
- * Revision 1.1 1996/04/07 08:18:55 morgan
- * Initial revision
- *
*/
-/* Andrew Morgan (morgan@parc.power.net) -- an example application
+/* Andrew Morgan (morgan@kernel.org) -- an example application
* that invokes a shell, based on blank.c */
#include <stdio.h>
/* ------- the application itself -------- */
-int main(int argc, char **argv, char **envp)
+int main(int argc, char **argv)
{
pam_handle_t *pamh=NULL;
char *username=NULL;
#
#
+include ../Make.Rules
+
# need to tell libpam about the default directory for PAMs
MOREFLAGS=-D"DEFAULT_MODULE_PATH=\"$(SECUREDIR)/\""
-# you may uncomment the following to build libpam in modified ways
-
-# lots of debugging information goes to /tmp/pam-debug.log
-#MOREFLAGS += -D"DEBUG"
-
-# pay attention to locked /etc/pam.conf or /etc/pam.d/* files
-#MOREFLAGS += -D"PAM_LOCKING"
-
-# read both the /etc/pam.d/ and pam.conf files specific to the deisred service
-#MOREFLAGS += -D"PAM_READ_BOTH_CONFS"
-
-# make a kludge attempt to be compatible with the old pam_strerror
-# calling convention
-#MOREFLAGS += -D"UGLY_HACK_FOR_PRIOR_BEHAVIOR_SUPPORT"
-
-# libpam.so needs -ldl, too.
-LINKLIBS += $(LIBDL)
-
-ifeq ($(DEBUG_REL),yes)
+ifeq ($(WITH_LIBDEBUG),yes)
LIBNAME=libpamd
else
LIBNAME=libpam
# ---------------------------------------------
-dummy:
- @echo "*** This is not a top-level Makefile!"
+dummy: ../Make.Rules all
# ---------------------------------------------
LIBPAMSTATIC = $(LIBNAME).a
ifdef STATIC
+@echo Did you mean to set STATIC\?
MODULES = $(shell cat ../modules/_static_module_objects)
STATICOBJ = pam_static.o
endif
pam_account.o pam_auth.o pam_session.o pam_password.o \
pam_env.o pam_log.o $(EXTRAS)
-ifdef DYNAMIC_LIBPAM
+ifeq ($(DYNAMIC_LIBPAM),yes)
+# libpam.so needs -ldl, too.
DLIBOBJECTS = $(addprefix dynamic/,$(LIBOBJECTS) $(STATICOBJ))
-ifdef STATICOBJ
+ifeq ($(STATICOBJ),yes)
dynamic/pam_static.o: pam_static.c ../modules/_static_module_objects
$(CC) $(CFLAGS) -c pam_static.c -o $@
endif
endif
-ifdef STATIC_LIBPAM
+ifeq ($(STATIC_LIBPAM),yes)
SLIBOBJECTS = $(addprefix static/,$(LIBOBJECTS) $(STATICOBJ))
ifdef STATICOBJ
static/pam_static.o: pam_static.c ../modules/_static_module_objects
# ---------------------------------------------
## rules
-all: dirs $(LIBPAM) $(LIBPAMSTATIC)
+all: dirs $(LIBPAM) $(LIBPAMSTATIC) ../Make.Rules
dirs:
-ifdef DYNAMIC_LIBPAM
- mkdir -p dynamic
+ifeq ($(DYNAMIC_LIBPAM),yes)
+ $(MKDIR) dynamic
endif
-ifdef STATIC_LIBPAM
- mkdir -p static
+ifeq ($(STATIC_LIBPAM),yes)
+ $(MKDIR) static
endif
dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
$(LIBPAM): $(DLIBOBJECTS)
-ifdef DYNAMIC_LIBPAM
+ifeq ($(DYNAMIC_LIBPAM),yes)
ifeq ($(USESONAME),yes)
- $(LD_L) $(SOSWITCH) $(LIBPAMNAME) -o $@ $(DLIBOBJECTS) $(MODULES) $(LINKLIBS)
+ $(LD_L) $(SOSWITCH) $(LIBPAMNAME) -o $@ $(DLIBOBJECTS) \
+ $(MODULES) $(LINKLIBS)
else
- $(LD_L) -o $@ $(DLIBOBJECTS) $(MODULES)
+ $(LD_L) -o $@ $(DLIBOBJECTS) $(MODULES) $(LINKLIBS)
endif
ifeq ($(NEEDSONAME),yes)
rm -f $(LIBPAMFULL)
endif
$(LIBPAMSTATIC): $(SLIBOBJECTS)
-ifdef STATIC_LIBPAM
+ifeq ($(STATIC_LIBPAM),yes)
$(AR) $@ $(SLIBOBJECTS) $(MODULES)
$(RANLIB) $@
endif
install: all
- $(MKDIR) $(FAKEROOT)$(INCLUDED) $(FAKEROOT)$(LIBDIR)
+ $(MKDIR) $(FAKEROOT)$(INCLUDED) $(FAKEROOT)$(libdir)
$(INSTALL) -m 644 include/security/pam_appl.h $(FAKEROOT)$(INCLUDED)
$(INSTALL) -m 644 include/security/pam_modules.h $(FAKEROOT)$(INCLUDED)
$(INSTALL) -m 644 include/security/_pam_macros.h $(FAKEROOT)$(INCLUDED)
ifdef MEMORY_DEBUG
$(INSTALL) -m 644 include/security/pam_malloc.h $(FAKEROOT)$(INCLUDED)
endif
-ifdef DYNAMIC_LIBPAM
- $(INSTALL) -m $(SHLIBMODE) $(LIBPAM) $(FAKEROOT)$(LIBDIR)/$(LIBPAMFULL)
+ifeq ($(DYNAMIC_LIBPAM),yes)
+ $(INSTALL) -m $(SHLIBMODE) $(LIBPAM) $(FAKEROOT)$(libdir)/$(LIBPAMFULL)
$(LDCONFIG)
ifneq ($(DYNTYPE),"sl")
- ( cd $(FAKEROOT)$(LIBDIR) ; rm -f $(LIBPAM) ; ln -s $(LIBPAMNAME) $(LIBPAM) )
+ ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBPAM) ; \
+ ln -s $(LIBPAMNAME) $(LIBPAM) )
endif
endif
-ifdef STATIC_LIBPAM
- $(INSTALL) -m 644 $(LIBPAMSTATIC) $(FAKEROOT)$(LIBDIR)
+ifeq ($(STATIC_LIBPAM),yes)
+ $(INSTALL) -m 644 $(LIBPAMSTATIC) $(FAKEROOT)$(libdir)
endif
remove:
rm -f $(FAKEROOT)$(INCLUDED)/pam_appl.h
rm -f $(FAKEROOT)$(INCLUDED)/pam_modules.h
rm -f $(FAKEROOT)$(INCLUDED)/pam_malloc.h
- rm -f $(FAKEROOT)$(LIBDIR)/$(LIBPAM).*
- rm -f $(FAKEROOT)$(LIBDIR)/$(LIBPAM)
+ rm -f $(FAKEROOT)$(libdir)/$(LIBPAM).*
+ rm -f $(FAKEROOT)$(libdir)/$(LIBPAM)
$(LDCONFIG)
- rm -f $(FAKEROOT)$(LIBDIR)/$(LIBPAMSTATIC)
+ rm -f $(FAKEROOT)$(libdir)/$(LIBPAMSTATIC)
clean:
rm -f a.out core *~ static/*.o dynamic/*.o
-
-extraclean: clean
- rm -f *.a *.out *.o *.so ./include/security/*~
+ rm -f *.a *.o *.so ./include/security/*~
if [ -d dynamic ]; then rmdir dynamic ; fi
if [ -d static ]; then rmdir static ; fi
* This item was added to accommodate event driven programs that need to
* manage delays more carefully. The function prototype for this data
* item is
- * void (*fail_delay)(int status, unsigned int delay);
+ * void (*fail_delay)(int status, unsigned int delay, void *appdata_ptr);
*/
#define HAVE_PAM_FAIL_DELAY
#ifndef _SECURITY_PAM_APPL_H
#define _SECURITY_PAM_APPL_H
-#include <security/_pam_types.h> /* Linux-PAM common defined types */
-
-/* -------------- The Linux-PAM Framework layer API ------------- */
-
#ifdef __cplusplus
extern "C" {
#endif
+#include <security/_pam_types.h> /* Linux-PAM common defined types */
+
+/* -------------- The Linux-PAM Framework layer API ------------- */
+
extern int pam_start(const char *service_name, const char *user,
const struct pam_conv *pam_conversation,
pam_handle_t **pamh);
*
*/
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#else
-# define _BSD_SOURCE
-#endif
+#include "pam_private.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
-#include "pam_private.h"
-
#ifdef __hpux
# include <stdio.h>
# include <syslog.h>
* Please see end of file for copyright.
*
* Creator: Marc Ewing.
- * Maintained: AGM
+ * Maintained: CVS
*/
#ifndef _PAM_PRIVATE_H
#define _PAM_PRIVATE_H
+#include <security/_pam_aconf.h>
+
/* this is not used at the moment --- AGM */
-#define LIBPAM_VERSION 67
+#define LIBPAM_VERSION (LIBPAM_VERSION_MAJOR*0x100 + LIBPAM_VERSION_MINOR)
#include <security/pam_appl.h>
#include <security/pam_modules.h>
/* delete the environment structure */
void _pam_drop_env(pam_handle_t *pamh);
-#ifdef LINUX_PAM
-
/* these functions deal with failure delays as required by the
authentication modules and application. Their *interface* is likely
to remain the same although their function is hopefully going to
/* this waits for the clock to stop ticking if status != PAM_SUCCESS */
void _pam_await_timer(pam_handle_t *pamh, int status);
-
-#endif /* LINUX_PAM */
-
typedef void (*voidfunc(void))(void);
#ifdef PAM_STATIC
help_env.o
misc_conv.o
xstrdup.o
+dynamic
+static
+#
# $Id$
#
-dummy:
- @echo "*** This is not a top-level Makefile!"
-
-# ///////////////////////////////////////////////////////////////////
-
-# uncomment if you wnat libpam_misc to be made as a dynamic library
-# AGM has had some segfaulting from libdl when I did this. I have not
-# investigated the cause...
+# lots of debugging information goes to /tmp/pam-debug.log
+#MOREFLAGS += -D"DEBUG"
-MAKE_DYNAMIC=yes
+include ../Make.Rules
ifeq ($(DEBUG_REL),yes)
- LIBNAME=pamd_misc
+ LIBNAME=libpam_miscd
else
- LIBNAME=pam_misc
+ LIBNAME=libpam_misc
endif
-LIBMAJOR=$(MAJOR_REL)
-LIBMINOR=$(MINOR_REL)
+VERSION=.$(MAJOR_REL)
+MODIFICATION=.$(MINOR_REL)
-FILES=misc_conv help_env
-
-#
-# Probably no need to alter anything below here.
-#
+CFLAGS += $(MOREFLAGS) $(DYNAMIC) $(STATIC)
-# build dynamic library names
+# dynamic library names
-LIBDYNAMIC=lib$(LIBNAME).$(DYNTYPE)
-LIBDYNMAJ=$(LIBDYNAMIC).$(LIBMAJOR)
-LIBDYNMIN=$(LIBDYNMAJ).$(LIBMINOR)
+LIBNAMED = $(LIBNAME).$(DYNTYPE)
+LIBNAMEDNAME = $(LIBNAMED)$(VERSION)
+LIBNAMEDFULL = $(LIBNAMEDNAME)$(MODIFICATION)
# static library name
-LIBSTATIC = lib$(LIBNAME).a
+LIBNAMEDSTATIC = $(LIBNAME).a
-# sources and object files
+LIBOBJECTS = help_env.o misc_conv.o
-LIBSRC = $(addsuffix .c,$(FILES))
-LIBOBJ = $(addsuffix .o,$(FILES))
+ifeq ($(DYNAMIC_LIBPAM),yes)
+DLIBOBJECTS = $(addprefix dynamic/,$(LIBOBJECTS))
+endif
+
+ifeq ($(STATIC_LIBPAM),yes)
+SLIBOBJECTS = $(addprefix static/,$(LIBOBJECTS))
+endif
-# rules
+# ---------------------------------------------
+## rules
-all: $(LIBSTATIC) $(LIBDYNAMIC)
+all: dirs $(LIBNAMED) $(LIBNAMEDSTATIC)
-$(LIBDYNAMIC): $(LIBOBJ)
-ifdef MAKE_DYNAMIC
+dirs:
+ifeq ($(DYNAMIC_LIBPAM),yes)
+ $(MKDIR) dynamic
+endif
+ifeq ($(STATIC_LIBPAM),yes)
+ $(MKDIR) static
+endif
+
+dynamic/%.o : %.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+
+static/%.o : %.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+
+$(LIBNAMED): $(DLIBOBJECTS)
+ifeq ($(DYNAMIC_LIBPAM),yes)
ifeq ($(USESONAME),yes)
- $(LD_L) $(SOSWITCH) $(LIBDYNMAJ) -o $@ $(LIBOBJ) $(LINKLIBS)
+ $(LD_L) $(SOSWITCH) $(LIBNAMEDNAME) -o $@ $(DLIBOBJECTS) $(MODULES) $(LINKLIBS)
else
- $(LD_L) -o $@ $(LIBOBJ)
+ $(LD_L) -o $@ $(DLIBOBJECTS) $(MODULES)
endif
ifeq ($(NEEDSONAME),yes)
- rm -f $(LIBDYNMIN)
- ln -s $(LIBDYNAMIC) $(LIBDYNMAJ)
- rm -f $(LIBDYNMAJ)
- ln -s $(LIBDYNAMIC) $(LIBDYNMIN)
+ rm -f $(LIBNAMEDFULL)
+ ln -s $(LIBNAMED) $(LIBNAMEDFULL)
+ rm -f $(LIBNAMEDNAME)
+ ln -s $(LIBNAMED) $(LIBNAMEDNAME)
endif
endif
-$(LIBSTATIC): $(LIBOBJ)
- $(AR) $@ $(LIBOBJ)
+$(LIBNAMEDSTATIC): $(SLIBOBJECTS)
+ifeq ($(STATIC_LIBPAM),yes)
+ $(AR) $@ $(SLIBOBJECTS) $(MODULES)
$(RANLIB) $@
+endif
install: all
$(MKDIR) $(FAKEROOT)$(INCLUDED)
- $(INSTALL) -m 644 ./pam_misc.h $(FAKEROOT)$(INCLUDED)
-ifdef MAKE_DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBDYNAMIC) $(FAKEROOT)$(LIBDIR)/$(LIBDYNMIN)
+ $(INSTALL) -m 644 include/security/pam_misc.h $(FAKEROOT)$(INCLUDED)
+ifeq ($(DYNAMIC_LIBPAM),yes)
+ $(MKDIR) $(FAKEROOT)$(libdir)
+ $(INSTALL) -m $(SHLIBMODE) $(LIBNAMED) $(FAKEROOT)$(libdir)/$(LIBNAMEDFULL)
$(LDCONFIG)
ifneq ($(DYNTYPE),"sl")
- ( cd $(FAKEROOT)$(LIBDIR) ; ln -sf $(LIBDYNMAJ) $(LIBDYNAMIC) )
+ ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBNAMED) ; ln -s $(LIBNAMEDNAME) $(LIBNAMED) )
endif
endif
- $(INSTALL) -m 644 $(LIBSTATIC) $(FAKEROOT)$(LIBDIR)
-
-clean:
- rm -f *.so *.a core a.out *~
+ifeq ($(STATIC_LIBPAM),yes)
+ $(INSTALL) -m 644 $(LIBNAMEDSTATIC) $(FAKEROOT)$(libdir)
+endif
remove:
rm -f $(FAKEROOT)$(INCLUDED)/pam_misc.h
- rm -f $(FAKEROOT)$(LIBDIR)/$(LIBDYNAMIC).*
- rm -f $(FAKEROOT)$(LIBDIR)/$(LIBDYNAMIC)
+ rm -f $(FAKEROOT)$(libdir)/$(LIBNAMEDFULL)
+ rm -f $(FAKEROOT)$(libdir)/$(LIBNAMED)
$(LDCONFIG)
- rm -f $(FAKEROOT)$(LIBDIR)/$(LIBSTATIC)
- rm -f $(FAKEROOT)$(INCLUDED)/chk_malloc.h
-
-.c.o:
- $(CC) -c $(DEFS) $(CFLAGS) $<
-
-extraclean:
- @$(MAKE) clean
- rm -f *.o *.bak
+ rm -f $(FAKEROOT)$(libdir)/$(LIBNAMEDSTATIC)
+clean:
+ rm -f a.out core *~ static/*.o dynamic/*.o
+ rm -f *.a *.out *.o *.so ./include/security/*~
+ if [ -d dynamic ]; then rmdir dynamic ; fi
+ if [ -d static ]; then rmdir static ; fi
* Written by Andrew Morgan <morgan@linux.kernel.org>
*/
-#ifdef linux
-#define _GNU_SOURCE
-#include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <signal.h>
#include <stdio.h>
# lots of debugging information goes to /tmp/pam-debug.log
#MOREFLAGS += -D"DEBUG"
+include ../Make.Rules
+
ifeq ($(DEBUG_REL),yes)
LIBNAME=libpamcd
else
VERSION=.$(MAJOR_REL)
MODIFICATION=.$(MINOR_REL)
-# ---------------------------------------------
-
-dummy:
- @echo "*** This is not a top-level Makefile!"
-
-# ---------------------------------------------
-
-CFLAGS += $(DYNAMIC) $(STATIC) $(MOREFLAGS)
+CFLAGS += $(MOREFLAGS) $(DYNAMIC) $(STATIC)
# dynamic library names
-LIBPAMC = $(LIBNAME).$(DYNTYPE)
-LIBPAMCNAME = $(LIBPAMC)$(VERSION)
-LIBPAMCFULL = $(LIBPAMCNAME)$(MODIFICATION)
+LIBNAMED = $(LIBNAME).$(DYNTYPE)
+LIBNAMEDNAME = $(LIBNAMED)$(VERSION)
+LIBNAMEDFULL = $(LIBNAMEDNAME)$(MODIFICATION)
# static library name
-LIBPAMCSTATIC = $(LIBNAME).a
+LIBNAMEDSTATIC = $(LIBNAME).a
LIBOBJECTS = pamc_client.o pamc_converse.o pamc_load.o
-ifdef DYNAMIC_LIBPAM
+ifeq ($(DYNAMIC_LIBPAM),yes)
DLIBOBJECTS = $(addprefix dynamic/,$(LIBOBJECTS))
endif
-ifdef STATIC_LIBPAM
+ifeq ($(STATIC_LIBPAM),yes)
SLIBOBJECTS = $(addprefix static/,$(LIBOBJECTS))
endif
# ---------------------------------------------
## rules
-all: dirs $(LIBPAMC) $(LIBPAMCSTATIC)
+all: dirs $(LIBNAMED) $(LIBNAMEDSTATIC)
dirs:
-ifdef DYNAMIC_LIBPAM
- mkdir -p dynamic
+ifeq ($(DYNAMIC_LIBPAM),yes)
+ $(MKDIR) dynamic
endif
-ifdef STATIC_LIBPAM
- mkdir -p static
+ifeq ($(STATIC_LIBPAM),yes)
+ $(MKDIR) static
endif
dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-$(LIBPAMC): $(DLIBOBJECTS)
-ifdef DYNAMIC_LIBPAM
+$(LIBNAMED): $(DLIBOBJECTS)
+ifeq ($(DYNAMIC_LIBPAM),yes)
ifeq ($(USESONAME),yes)
- $(LD_L) $(SOSWITCH) $(LIBPAMCNAME) -o $@ $(DLIBOBJECTS) $(MODULES) $(LINKLIBS)
+ $(LD_L) $(SOSWITCH) $(LIBNAMEDNAME) -o $@ $(DLIBOBJECTS) $(MODULES) $(LINKLIBS)
else
$(LD_L) -o $@ $(DLIBOBJECTS) $(MODULES)
endif
ifeq ($(NEEDSONAME),yes)
- rm -f $(LIBPAMCFULL)
- ln -s $(LIBPAMC) $(LIBPAMCFULL)
- rm -f $(LIBPAMCNAME)
- ln -s $(LIBPAMC) $(LIBPAMCNAME)
+ rm -f $(LIBNAMEDFULL)
+ ln -s $(LIBNAMED) $(LIBNAMEDFULL)
+ rm -f $(LIBNAMEDNAME)
+ ln -s $(LIBNAMED) $(LIBNAMEDNAME)
endif
endif
-$(LIBPAMCSTATIC): $(SLIBOBJECTS)
-ifdef STATIC_LIBPAM
+$(LIBNAMEDSTATIC): $(SLIBOBJECTS)
+ifeq ($(STATIC_LIBPAM),yes)
$(AR) $@ $(SLIBOBJECTS) $(MODULES)
$(RANLIB) $@
endif
install: all
$(MKDIR) $(FAKEROOT)$(INCLUDED)
$(INSTALL) -m 644 include/security/pam_client.h $(FAKEROOT)$(INCLUDED)
-ifdef DYNAMIC_LIBPAM
- $(INSTALL) -m $(SHLIBMODE) $(LIBPAMC) $(FAKEROOT)$(LIBDIR)/$(LIBPAMCFULL)
+ifeq ($(DYNAMIC_LIBPAM),yes)
+ $(MKDIR) $(FAKEROOT)$(libdir)
+ $(INSTALL) -m $(SHLIBMODE) $(LIBNAMED) $(FAKEROOT)$(libdir)/$(LIBNAMEDFULL)
$(LDCONFIG)
ifneq ($(DYNTYPE),"sl")
- ( cd $(FAKEROOT)$(LIBDIR) ; rm -f $(LIBPAMC) ; ln -s $(LIBPAMCNAME) $(LIBPAMC) )
+ ( cd $(FAKEROOT)$(libdir) ; rm -f $(LIBNAMED) ; ln -s $(LIBNAMEDNAME) $(LIBNAMED) )
endif
endif
-ifdef STATIC_LIBPAM
- $(INSTALL) -m 644 $(LIBPAMCSTATIC) $(FAKEROOT)$(LIBDIR)
+ifeq ($(STATIC_LIBPAM),yes)
+ $(INSTALL) -m 644 $(LIBNAMEDSTATIC) $(FAKEROOT)$(libdir)
endif
remove:
rm -f $(FAKEROOT)$(INCLUDED)/pam_client.h
+ rm -f $(FAKEROOT)$(libdir)/$(LIBNAMEDFULL)
+ rm -f $(FAKEROOT)$(libdir)/$(LIBNAMED)
$(LDCONFIG)
- rm -f $(FAKEROOT)$(LIBDIR)/$(LIBPAMCSTATIC)
+ rm -f $(FAKEROOT)$(libdir)/$(LIBNAMEDSTATIC)
clean:
rm -f a.out core *~ static/*.o dynamic/*.o
-
-extraclean: clean
rm -f *.a *.out *.o *.so ./include/security/*~
if [ -d dynamic ]; then rmdir dynamic ; fi
if [ -d static ]; then rmdir static ; fi
+
#define __PAM_BP_OCTET(x,y) (*((y) + (__u8 *)(x)))
#define PAM_BP_MIN_SIZE (sizeof(__u32) + sizeof(__u8))
-#define PAM_PB_MAX_LENGTH 0x8000 /* an advisory limit */
+#define PAM_BP_MAX_LENGTH 0x20000 /* an advisory limit */
#define PAM_BP_CONTROL(x) (__PAM_BP_OCTET(x,4))
#define PAM_BP_SIZE(x) ((__PAM_BP_OCTET(x,0)<<24)+ \
(__PAM_BP_OCTET(x,1)<<16)+ \
#define LIBPAMC_H
#include <security/pam_client.h>
-#include <security/pam_misc.h>
+#include <security/_pam_macros.h>
#include <sys/stat.h>
#include <unistd.h>
#
#
-MODDIRS=$(shell /bin/ls -d pam_*)
-
-# ////////////////////////////////////////////////////
-# // You should not modify anything below this line //
-# ////////////////////////////////////////////////////
+include ../Make.Rules
-dummy:
- @echo "*** This is not a top-level Makefile! ***"
-
-# -----------------------------------------------------------
+MODDIRS=$(shell /bin/ls -d pam_*)
all:
- @echo modules for $(OS) are:
+ @echo modules sources available are:
@ls -d $(MODDIRS) 2>/dev/null ; echo :--------
@echo
ifdef STATIC
} fi ; \
done
-extraclean: lclean
- for i in $(MODDIRS) ; do \
- if [ -d $$i ]; then \
- $(MAKE) -C $$i extraclean ; \
- fi ; \
- done
-
This directory contains the modules.
If you want to reserve a module name please email <pam-list@redhat.com>
-and announce its name. Andrew Morgan, <morgan@parc.power.net>, will
+and announce its name. Andrew Morgan, <morgan@linux.kernel.org>, will
add it to the Makefile in the next release of Linux-PAM.
As of Linux-PAM-0.40 modules can optionally conform to the static
#########################################################################
+# $Id$
+#########################################################################
# This is a makefile that does nothing. It is designed to be included
# by module Makefile-s when they are not compatable with the local
# system
all:
@echo "This module will not be compiled on this system"
-extraclean: clean
+remove: clean
install: clean
# what you are doing!).
#
-TITLE=pam_access
-CONFD=$(CONFIGED)/security
-export CONFD
-CONFILE=$(CONFD)/access.conf
-export CONFILE
-
-# Convenient defaults for compiling independently of the full source
-# tree.
-ifndef FULL_LINUX_PAM_SOURCE_TREE
-export DYNAMIC=-DPAM_DYNAMIC
-export CC=gcc
-export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
- -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
- -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
- -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
- -Wshadow -pedantic -fPIC
-export MKDIR=mkdir -p
-export LD_D=gcc -shared -Xlinker -x
-endif
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
+include ../../Make.Rules
-DEFS=-DCONFILE=\"$(CONFILE)\"
+TITLE=pam_access
+LOCAL_CONFILE=./access.conf
+INSTALLED_CONFILE=$(SCONFIGD)/access.conf
+DEFS=-DDEFAULT_CONF_FILE=\"$(INSTALLED_CONFILE)\"
CFLAGS += $(DEFS)
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
- $(MKDIR) $(FAKEROOT)$(SCONFIGED)
- bash -f ./install_conf
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
- rm -f $(FAKEROOT)$(CONFILE)
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
- rm -f ./.ignore_age
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak
+MODULE_SIMPLE_INSTALL=bash -f ../install_conf "$(FAKEROOT)" "$(SCONFIGD)" "$(INSTALLED_CONFILE)" "$(TITLE)" "$(LOCAL_CONFILE)"
+MODULE_SIMPLE_REMOVE=rm -f $(FAKEROOT)$(INSTALLED_CONFILE)
+MODULE_SIMPLE_CLEAN=rm -f ./.ignore_age
-.c.o:
- $(CC) $(CFLAGS) -c $<
+include ../Simple.Rules
*
*/
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdio.h>
#include <stdlib.h>
closelog();
}
-#define PAM_ACCESS_CONFIG CONFILE
+#ifdef DEFAULT_CONF_FILE
+# define PAM_ACCESS_CONFIG DEFAULT_CONF_FILE
+#else
+# define PAM_ACCESS_CONFIG "/etc/security/access.conf"
+#endif
int strcasecmp(const char *s1, const char *s2);
#
+# $Id$
+#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# Created by Cristian Gafton <gafton@redhat.com> 1996/09/10
-#
-
-ifndef FULL_LINUX_PAM_SOURCE_TREE
-#
-# here you should make default variable defines...
-#
-MKDIR=mkdir -p
-LD_D=gcc -shared -Xlinker -x
-INSTALL=install
-SECUREDIR=/usr/lib/security
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/10/08
#
-HAVE_CRACKLIB=yes
-EXTRALS=-lcrypt
-endif
-ifeq ($(HAVE_CRACKLIB),yes)
+include ../../Make.Rules
TITLE=pam_cracklib
-CRACKLIB=-lcrack
-ifeq ($(shell if [ -f /usr/lib/cracklib_dict.hwm ]; then echo yes ; fi),yes)
- CRACKLIB_DICTPATH=/usr/lib/cracklib_dict
-else
- CRACKLIB_DICTPATH=/usr/share/dict/cracklib_dict
-endif
-#
-ifeq ($(shell if [ -f /usr/include/crypt.h ]; then echo yes ; fi),yes)
- NEED_CRYPT_HEADER=-DNEED_CRYPT_HEADER
-endif
-#
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-ifdef CRACKLIB_DICTPATH
-CFLAGS+=-DCRACKLIB_DICTPATH=\"$(CRACKLIB_DICTPATH)\"
-endif
-
-dynamic/%.o : %.c
- $(CC) $(NEED_CRYPT_HEADER) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(NEED_CRYPT_HEADER) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC) Makefile
+ifeq ($(HAVE_LIBCRACK),yes)
+BUILD_THIS_MODULE=yes
+MODULE_SIMPLE_EXTRALIBS=-lcrack
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(CRACKLIB) $(EXTRALS) $(LINKLIBS)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
+# These two should really be provided by ../../pam_aconf.h
+CFLAGS+=-DCRACKLIB_DICTPATH=\"$(CRACKLIB_DICTPATH)\"
+ifeq ($(HAVE_LIBCRYPT),yes)
+ CFLAGS+=-DNEED_CRYPT_HEADER
endif
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
endif
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~ *.so
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
-
+ifeq ($(BUILD_THIS_MODULE),yes)
+ include ../Simple.Rules
else
-
-include ../dont_makefile
-
+ include ../dont_makefile
endif
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:11:33 agmorgan
-# Imported 0.72 Linux-PAM sources
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-# Revision 1.1.1.1 1998/07/12 05:17:16 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.7 1997/04/05 06:43:41 morgan
-# full-source-tree and fakeroot
-#
-# Revision 1.6 1997/02/15 19:04:27 morgan
-# fixed email
-#
-# Revision 1.5 1996/11/10 20:11:48 morgan
-# crossplatform support
-#
-# Revision 1.4 1996/09/05 06:50:12 morgan
-# ld --> gcc
-#
-# Revision 1.3 1996/05/26 15:48:38 morgan
-# make dynamic and static dirs
-#
-# Revision 1.2 1996/05/26 04:00:16 morgan
-# changes for automated static/dynamic modules
-#
-# Revision 1.1 1996/03/16 17:47:36 morgan
-# Initial revision
-#
-#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
-#
-
-# Convenient defaults for compiling independently of the full source
-# tree.
-ifndef FULL_LINUX_PAM_SOURCE_TREE
-export DYNAMIC=-DPAM_DYNAMIC
-export CC=gcc
-export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
- -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
- -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
- -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
- -Wshadow -pedantic -fPIC
-export MKDIR=mkdir -p
-export LD_D=gcc -shared -Xlinker -x
-endif
-#
+include ../../Make.Rules
TITLE=pam_deny
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
-
+include ../Simple.Rules
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:11:33 agmorgan
-# Imported 0.72 Linux-PAM sources
-#
-# Revision 1.2 1999/10/09 05:08:28 morgan
-# removed libpwdb dependencies (libpwdb support is depreciated)
-#
-# Revision 1.1.1.1 1998/07/12 05:17:16 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.1 1997/04/05 06:42:35 morgan
-# Initial revision
-#
-# Revision 1.1 1997/01/04 20:32:52 morgan
-# Initial revision
-#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/12/8
-# Adaptations by Dave Kinclea and Cristian Gafton
-#
-
-TITLE=pam_env
-
-CONFD=$(CONFIGED)/security
-export CONFD
-CONFILE=$(CONFD)/pam_env.conf
-export CONFILE
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
+include ../../Make.Rules
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(EXTRALIB)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS) $(EXTRALIB)
-endif
-
-install: all
-ifdef DYNAMIC
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
- $(MKDIR) $(FAKEROOT)$(SCONFIGED)
- bash -f ./install_conf
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
+TITLE=pam_env
+LOCAL_CONFILE=./pam_env.conf-example
+INSTALLED_CONFILE=$(SCONFIGD)/pam_env.conf
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
+DEFS=-DDEFAULT_CONF_FILE=\"$(INSTALLED_CONFILE)\"
+CFLAGS += $(DEFS)
-.c.o:
- $(CC) $(CFLAGS) -c $<
+MODULE_SIMPLE_INSTALL=bash -f ../install_conf "$(FAKEROOT)" "$(SCONFIGD)" "$(INSTALLED_CONFILE)" "$(TITLE)" "$(LOCAL_CONFILE)"
+MODULE_SIMPLE_REMOVE=rm -f $(FAKEROOT)$(INSTALLED_CONFILE)
+MODULE_SIMPLE_CLEAN=rm -f ./.ignore_age
+include ../Simple.Rules
#define DEFAULT_ETC_ENVFILE "/etc/environment"
#define DEFAULT_READ_ENVFILE 1
-#define _GNU_SOURCE
-#define _BSD_SOURCE
+#include <security/_pam_aconf.h>
-#include <features.h>
#include <ctype.h>
#include <errno.h>
#include <pwd.h>
else
+include ../../Make.Rules
+
TITLE=pam_filter
FILTERS=upperLOWER
FILTERSDIR=$(SUPLEMENTED)/pam_filter
export FILTERSDIR
-CFLAGS += -I. -I..
-#
+CFLAGS += -Iinclude
LIBSRC = $(TITLE).c
LIBOBJ = $(TITLE).o
####################### don't edit below #######################
-dummy:
- @echo "**** This is not a top-level Makefile "
- exit
-
#
# this is where we compile this module
#
all: dirs $(LIBSHARED) $(LIBSTATIC) register filters
dirs:
- if [ ! -f security ]; then ln -sf include security ; fi
+ if [ ! -e include/security ]; then ln -sf . include/security ; fi
ifdef DYNAMIC
$(MKDIR) ./dynamic
endif
$(LD) -r -o $@ $(LIBOBJS)
endif
+remove:
+ rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
+ rm -f $(FAKEROOT)$(INCLUDED)/pam_filter.h
+ @for i in $(FILTERS) ; do \
+ if [ -d $$i ]; then \
+ $(MAKE) -C $$i remove ; \
+ fi ; \
+ done
+
install: all
@for i in $(FILTERS) ; do \
if [ -d $$i ]; then \
$(MKDIR) $(FAKEROOT)$(INCLUDED)
$(INSTALL) -m 644 include/pam_filter.h $(FAKEROOT)$(INCLUDED)
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
- rm -f $(FAKEROOT)$(INCLUDED)/pam_filter.h
- @for i in $(FILTERS) ; do \
- if [ -d $$i ]; then \
- $(MAKE) -C $$i remove ; \
- fi ; \
- done
-
-lclean:
- rm -f $(LIBSHARED) $(LIBOBJD) $(LIBOBJS) core *~
-
-clean: lclean
+clean:
@for i in $(FILTERS) ; do \
if [ -d $$i ]; then \
$(MAKE) -C $$i clean ; \
fi ; \
done
-
-extraclean: lclean
- @rm -f security
- @rm -f *.a *.o *.so *.bak
- for i in $(FILTERS) ; do \
- if [ -d $$i ]; then \
- $(MAKE) -C $$i extraclean ; \
- fi ; \
- done
-
-security:
- ln -s include security
+ rm -f $(LIBSHARED) $(LIBOBJD) $(LIBOBJS) core *~
+ rm -f include/security
+ rm -fr dynamic static
+ rm -f *.a *.o *.so *.bak
endif
* Richard Stevens' UNIX Network Programming book.
*/
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdlib.h>
#include <syslog.h>
#
# $Id$
#
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:11:37 agmorgan
-# Imported 0.72 Linux-PAM sources
-#
-# Revision 1.1.1.1 1998/07/12 05:17:16 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.5 1997/04/05 06:41:35 morgan
-# fakeroot
-#
-# Revision 1.4 1997/01/04 20:25:04 morgan
-# removed need for make
-#
-# Revision 1.3 1996/11/10 20:13:08 morgan
-# email address
-#
-# Revision 1.2 1996/11/10 20:12:24 morgan
-# cross platform support
-#
-# Revision 1.1 1996/06/02 08:17:02 morgan
-# Initial revision
-#
-#
# This directory contains a pam_filter filter executable
#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
+# Created by Andrew Morgan <morgan@transmeta.com> 1996/3/11
#
+include ../../../Make.Rules
+
TITLE=upperLOWER
#
+CFLAGS += -I../include
+
OBJS = $(TITLE).o
####################### don't edit below #######################
-dummy:
- @echo "**** This is not a top-level Makefile "
-
all: $(TITLE)
$(TITLE): $(OBJS)
$(CC) -o $(TITLE) $(OBJS)
- strip $(TITLE)
+ $(STRIP) $(TITLE)
install:
$(MKDIR) $(FAKEROOT)$(FILTERSDIR)
clean:
rm -f $(TITLE) $(OBJS) core *~
-extraclean: clean
- rm -f *.bak
-
.c.o:
$(CC) $(CFLAGS) -c $<
* provided with Linux-PAM). This filter simply transposes upper and
* lower case letters, it is intended for demonstration purposes and
* it serves no purpose other than to annoy the user...
- *
- * $Log$
- * Revision 1.1.1.1 2000/06/20 22:11:37 agmorgan
- * Imported 0.72 Linux-PAM sources
- *
- * Revision 1.2 1999/07/08 05:01:48 morgan
- * glibc fixes (Thorsten Kukuk, Adam J. Richter)
- *
- * Revision 1.1.1.1 1998/07/12 05:17:16 morgan
- * Linux PAM sources pre-0.66
- *
- * Revision 1.1 1996/06/02 08:17:02 morgan
- * Initial revision
- *
*/
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdio.h>
#include <syslog.h>
}
}
-int main(int argc, char **argv, char **envp)
+extern char **environ;
+
+int main(int argc, char **argv)
{
char buffer[BUFSIZ];
fd_set readers;
int i;
fprintf(stderr,"environment :[\r\n");
- for (i=0; envp[i]; ++i) {
- fprintf(stderr,"-> %s\r\n",envp[i]);
+ for (i=0; environ[i]; ++i) {
+ fprintf(stderr,"-> %s\r\n",environ[i]);
}
fprintf(stderr,"]: end\r\n");
}
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# Created by Andrew Morgan <morgan@linux.kernel.org> 1996/11/14
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-TITLE=pam_ftp
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
+include ../../Make.Rules
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_ftp
+include ../Simple.Rules
/* the following is a password that "can't be correct" */
#define BLOCK_PASSWORD "\177BAD PASSWPRD\177"
-#define _GNU_SOURCE
-#define _BSD_SOURCE
+#include <security/_pam_aconf.h>
-#include <features.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#
# $Id$
#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
-#
-# Created by Andrew Morgan <morgan@linux.kernel.org> 1996/6/11
-#
-
-TITLE=pam_group
-CONFD=$(CONFIGED)/security
-export CONFD
-CONFILE=$(CONFD)/group.conf
-export CONFILE
-
#
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
+include ../../Make.Rules
-DEFS=-DCONFILE=\"$(CONFILE)\"
+TITLE=pam_group
+LOCAL_CONFILE=./group.conf
+INSTALLED_CONFILE=$(SCONFIGD)/group.conf
+DEFS=-DDEFAULT_CONF_FILE=\"$(CONFILE)\"
CFLAGS += $(DEFS)
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(ELIBS)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS) $(ELIBS)
-endif
-
-install: all
-ifdef DYNAMIC
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
- $(MKDIR) $(FAKEROOT)$(SCONFIGED)
- bash -f ./install_conf
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
- rm -f $(FAKEROOT)$(CONFILE)
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
- rm -f ./.ignore_age
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+MODULE_SIMPLE_INSTALL=bash -f ../install_conf "$(FAKEROOT)" "$(SCONFIGD)" "$(INSTALLED_CONFILE)" "$(TITLE)" "$(LOCAL_CONFILE)"
+MODULE_SIMPLE_REMOVE=rm -f $(FAKEROOT)$(INSTALLED_CONFILE)
+MODULE_SIMPLE_CLEAN=rm -f ./.ignore_age
+include ../Simple.Rules
#include <sys/stat.h>
#include <fcntl.h>
-#define PAM_GROUP_CONF CONFILE /* from external define */
+#ifdef DEFAULT_CONF_FILE
+# define PAM_GROUP_CONF DEFAULT_CONF_FILE /* from external define */
+#else
+# define PAM_GROUP_CONF "/etc/security/group.conf"
+#endif
#define PAM_GROUP_BUFLEN 1000
#define FIELD_SEPARATOR ';' /* this is new as of .02 */
#
+# $Id$
+#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# Michael K. Johnson <johnsonm@redhat.com> 1996/10/24
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-TITLE=pam_issue
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
+include ../../Make.Rules
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- mkdir -p ./dynamic
-endif
-ifdef STATIC
- mkdir -p ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(LINKLIBS)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- mkdir -p $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- install -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_issue
+include ../Simple.Rules
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:11:40 agmorgan
-# Imported 0.72 Linux-PAM sources
-#
-# Revision 1.1.1.1 1998/07/12 05:17:17 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.2 1997/04/05 06:17:14 morgan
-# fakeroot fixed
-#
-# Revision 1.1 1997/01/04 20:29:28 morgan
-# Initial revision
-#
-#
-#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/12/8
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-# Convenient defaults for compiling independently of the full source
-# tree.
-ifndef FULL_LINUX_PAM_SOURCE_TREE
-export DYNAMIC=-DPAM_DYNAMIC
-export CC=gcc
-export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
- -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
- -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
- -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
- -Wshadow -pedantic -fPIC
-export MKDIR=mkdir -p
-export LD_D=gcc -shared -Xlinker -x
-endif
+include ../../Make.Rules
TITLE=pam_lastlog
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-
-####################### don't edit below #######################
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
-
+include ../Simple.Rules
* present (login) service.
*/
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <fcntl.h>
#include <time.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
+#define __USE_BSD
#include <syslog.h>
#include <unistd.h>
#
+# $Id$
+#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# Created by Cristian Gafton <gafton@redhat.com> 1996/09/10
-#
-
-ifeq ($(OS),linux)
-TITLE=pam_limits
-CONFD=$(CONFIGED)/security
-export CONFD
-CONFILE=$(CONFD)/limits.conf
-export CONFILE
-
-CFLAGS+=-DLIMITS_FILE=\"$(CONFILE)\"
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-dummy:
+include ../../Make.Rules
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
+TITLE=pam_limits
-install: all
-ifdef DYNAMIC
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
- $(MKDIR) $(FAKEROOT)$(SCONFIGED)
- bash -f ./install_conf
+ifeq ($(OS),linux)
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
+LOCAL_CONFILE=./limits.skel
+INSTALLED_CONFILE=$(SCONFIGD)/limits.conf
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~ *.so
+DEFS=-DDEFAULT_CONF_FILE=\"$(INSTALLED_CONFILE)\"
+CFLAGS += $(DEFS)
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
+MODULE_SIMPLE_INSTALL=bash -f ../install_conf "$(FAKEROOT)" "$(SCONFIGD)" "$(INSTALLED_CONFILE)" "$(TITLE)" "$(LOCAL_CONFILE)"
+MODULE_SIMPLE_REMOVE=rm -f $(FAKEROOT)$(INSTALLED_CONFILE)
+MODULE_SIMPLE_CLEAN=rm -f ./.ignore_age
-.c.o:
- $(CC) $(CFLAGS) -c $<
+include ../Simple.Rules
else
+
include ../dont_makefile
+
endif
#error THIS CODE IS KNOWN TO WORK ONLY ON LINUX !!!
#endif
-#define _GNU_SOURCE
-#define _BSD_SOURCE
-
-#include <features.h>
+#include <security/_pam_aconf.h>
#include <stdio.h>
#include <unistd.h>
/* limits stuff */
-#ifndef LIMITS_FILE
-#define LIMITS_FILE "/etc/security/limits.conf"
+#ifdef DEFAULT_CONF_FILE
+# define LIMITS_FILE DEFAULT_CONF_FILE
+#else
+# define LIMITS_FILE "/etc/security/limits.conf"
#endif
#define LIMIT_ERR 1 /* error setting a limit */
#
+# $Id$
+#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-
-TITLE=pam_listfile
-
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
+include ../../Make.Rules
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_listfile
+include ../Simple.Rules
* This code began life as the pam_rootok module.
*/
-#ifdef linux
-# define _SVID_SOURCE
-# define _BSD_SOURCE
-# define __USE_BSD
-# define __USE_SVID
-# define __USE_MISC
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdio.h>
#include <stdlib.h>
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:11:45 agmorgan
-# Imported 0.72 Linux-PAM sources
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-# Revision 1.1.1.1 1998/07/12 05:17:17 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.3 1997/04/05 06:37:45 morgan
-# fakeroot
-#
-# Revision 1.2 1997/02/15 16:07:22 morgan
-# optional libpwdb compilation
-#
-# Revision 1.1 1997/01/04 20:32:52 morgan
-# Initial revision
-#
-#
-#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/12/8
-#
-
-TITLE=pam_mail
-
-ifndef STATIC
-ifeq ($(HAVE_PWDBLIB),yes)
-CFLAGS += -DWANT_PWDB
-EXTRALIB = -lpwdb
-endif
-endif
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
+include ../../Make.Rules
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(EXTRALIB)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS) $(EXTRALIB)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_mail
+include ../Simple.Rules
#define YOUR_MAIL_STANDARD_FORMAT "You have %smail."
#define NO_MAIL_STANDARD_FORMAT "No mail."
-#define _BSD_SOURCE
-
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <ctype.h>
#include <pwd.h>
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-# Convenient defaults for compiling independently of the full source
-# tree.
-
-#
+include ../../Make.Rules
TITLE=pam_mkhomedir
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(LINKLIBS) -lpam
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+include ../Simple.Rules
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-# Convenient defaults for compiling independently of the full source
-# tree.
-
-#
+include ../../Make.Rules
TITLE=pam_motd
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(LINKLIBS)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+include ../Simple.Rules
#
+# $Id$
+#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# Michael K. Johnson <johnsonm@redhat.com> 1996/10/24
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-TITLE=pam_nologin
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
+include ../../Make.Rules
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- mkdir -p ./dynamic
-endif
-ifdef STATIC
- mkdir -p ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) -lc
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- mkdir -p $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- install -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_nologin
+include ../Simple.Rules
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:11:46 agmorgan
-# Imported 0.72 Linux-PAM sources
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-# Revision 1.1.1.1 1998/07/12 05:17:16 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.8 1997/04/05 06:33:25 morgan
-# fakeroot
-#
-# Revision 1.7 1997/02/15 19:02:27 morgan
-# updated email address
-#
-# Revision 1.6 1996/11/10 20:14:34 morgan
-# cross platform support
-#
-# Revision 1.5 1996/09/05 06:32:45 morgan
-# ld --> gcc
-#
-# Revision 1.4 1996/05/26 15:49:25 morgan
-# make dynamic and static dirs
-#
-# Revision 1.3 1996/05/26 04:04:26 morgan
-# automated static support
-#
-# Revision 1.2 1996/03/16 17:56:38 morgan
-# tidied up
-#
-#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
-#
-
-# Convenient defaults for compiling independently of the full source
-# tree.
-ifndef FULL_LINUX_PAM_SOURCE_TREE
-export DYNAMIC=-DPAM_DYNAMIC
-export CC=gcc
-export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
- -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
- -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
- -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
- -Wshadow -pedantic -fPIC
-export MKDIR=mkdir -p
-export LD_D=gcc -shared -Xlinker -x
-endif
-#
-#
+include ../../Make.Rules
TITLE=pam_permit
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(TARGET_ARCH) -c $< -o $@
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-endif
-
-ifdef DYNAMIC
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-endif
-
-ifdef STATIC
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
-
+include ../Simple.Rules
# <morgan@parc.power.net> 1996/11/6
#
-#
-# Note, the STATIC module is commented out because it doesn't work.
-# please fix!
-#
+include ../../Make.Rules
-ifndef FULL_LINUX_PAM_SOURCE_TREE
-export DYNAMIC=-DPAM_DYNAMIC
-export CC=gcc
-export CFLAGS=-O2 -Dlinux -DLINUX_PAM \
- -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
- -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \
- -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
- -Wshadow -pedantic -fPIC
-export MKDIR=mkdir -p
-export LD_D=gcc -shared -Xlinker -x
-export HAVE_PWDBLIB=yes
-endif
+ifeq ($(HAVE_LIBPWDB),yes)
-ifeq ($(shell if [ -f /lib/libcrypt.so.* ]; then echo yes ; else echo no ; fi),yes)
-EXTRALS += -lcrypt
-endif
+EXTRALS += -lpwdb
+EXTRAS += -DCHKPWD_HELPER=\"$(SUPLEMENTED)/$(CHKPWD)\"
-ifeq ($(HAVE_PWDBLIB),yes)
+ifeq ($(HAVE_LIBCRYPT),yes)
+ EXTRALS += -lcrypt
+endif
TITLE=pam_pwdb
CHKPWD=pwdb_chkpwd
-# compilation flags
-EXTRAS=
-# extra object files
-PLUS=
-# extra files that may be needed to be created
-CREATE=
-
-# NOTE: this module links dynamically to the libpwdb library.
-EXTRALS += -lpwdb
-EXTRAS += -DCHKPWD_HELPER=\"$(SUPLEMENTED)/$(CHKPWD)\"
-
-########################### don't edit below ##########################
-
LIBSRC = $(TITLE).c
LIBOBJ = $(TITLE).o
LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
$(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
endif
$(MKDIR) $(FAKEROOT)$(SUPLEMENTED)
- $(INSTALL) -m 4555 -o root -g root $(CHKPWD) $(FAKEROOT)$(SUPLEMENTED)
+ $(INSTALL) -m 4555 $(CHKPWD) $(FAKEROOT)$(SUPLEMENTED)
remove:
rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
clean:
rm -f $(CHKPWD) $(LIBOBJD) $(LIBOBJS) $(MOREDELS) core *~ *.o *.so
-
-extraclean: clean
rm -f *.a *.o *.so *.bak
+ rm -fr dynamic static
else
include ../dont_makefile
endif
-
-#####################################################################
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:11:47 agmorgan
-# Imported 0.72 Linux-PAM sources
-#
-# Revision 1.4 1999/08/01 16:18:27 morgan
-# added a conditional for libcrypt
-#
-# Revision 1.3 1999/07/08 05:02:02 morgan
-# glibc fixes (Thorsten Kukuk, Adam J. Richter)
-#
-# Revision 1.2 1999/07/04 23:22:38 morgan
-# Andrey's MD5 (bigendian) work around + cleanup to address problems with
-# applications that let an (ab)user kill them off without giving PAM the
-# opportunity to end. [Problem report from Tani Hosokawa on bugtraq.]
-#
-# Revision 1.1.1.1 1998/07/12 05:17:16 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.7 1997/04/05 06:28:50 morgan
-# fakeroot
-#
-# Revision 1.6 1997/02/15 17:25:32 morgan
-# update for .56 . extra commands for new helper binary
-#
-# Revision 1.5 1997/01/04 20:39:08 morgan
-# conditional on having libpwdb
-#
-# Revision 1.4 1996/12/01 03:02:03 morgan
-# changed banner, removed linking libraries
-#
-# Revision 1.3 1996/11/10 20:14:42 morgan
-# cross platform support
-#
-# Revision 1.2 1996/09/05 06:36:49 morgan
-# options added and use of LD altered
-#
-# Revision 1.1 1996/08/29 13:23:29 morgan
-# Initial revision
-#
-#
/* #define DEBUG */
-#define _SVID_SOURCE
-#define _BSD_SOURCE
-#define _BSD_COMPAT
-
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <sys/types.h>
#include <stdarg.h>
if ( on(UNIX_LIKE_AUTH, ctrl) ) {
D(("recording return code for next time [%d]", retval));
- pam_set_data(pamh, "pwdb_setcred_return", (void *) &retval, NULL);
+ pam_set_data(pamh, "pwdb_setcred_return", (void *) retval, NULL);
}
D(("done. [%s]", pam_strerror(pamh, retval)));
int *pretval = &retval;
D(("recovering return code from auth call"));
- pam_get_data(pamh, "pwdb_setcred_return", (const void **) &pretval);
- pam_set_data(pamh, "pwdb_setcred_return", NULL, NULL);
+ pam_get_data(pamh, "pwdb_setcred_return", (const void **) pretval);
D(("recovered data indicates that old retval was %d", retval));
}
*
*/
-#define _BSD_SOURCE
-
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdarg.h>
#include <stdio.h>
# STATIC modules are not supported
#
+include ../../Make.Rules
+
TITLE=pam_radius
CONFD=$(CONFIGED)/security
export CONFD
CONFILE=$(CONFD)/radius.conf
export CONFILE
-ifeq ($(HAVE_PWDBLIB),yes)
+ifeq ($(HAVE_LIBPWDB),yes)
#
####################### don't edit below #######################
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
-
all: dirs $(LIBSHARED) $(LIBSTATIC) register
dirs:
clean:
rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
rm -f *.a *.o *.so *.bak dynamic/* static/*
+ rm -rf dynamic static
.c.o:
$(CC) $(CFLAGS) -c $<
+/*
+ * $Id$
+ */
#ifndef PAM_RADIUS_H
#define PAM_RADIUS_H
-#define _GNU_SOURCE
-#include <features.h>
+#include <security/_pam_aconf.h>
#include <stdio.h>
-# This Makefile controls a build process of the pam_rhosts modules
-# for Linux-PAM. You should not modify this Makefile.
+#
+# $Id$
+#
+# This Makefile controls a build process of $(TITLE) module for
+# Linux-PAM. You should not modify this Makefile (unless you know
+# what you are doing!).
+#
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
+#
-LIBAUTHOBJ = pam_rhosts_auth.o
-LIBAUTHSRC = pam_rhosts_auth.c
-LIBSESSOBJ =
-LIBSESSSRC =
-LIBPASSWDSRC =
-LIBPASSWDOBJ =
-LIBOBJ = $(LIBAUTHOBJ) $(LIBSESSOBJ) $(LIBPASSWDOBJ)
-LIBSRC = $(LIBAUTHSRC) $(LIBSESSSRC) $(LIBPASSWDSRC)
+include ../../Make.Rules
-ifdef STATIC
-LIBSTATIC = libpam_rhosts.o
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-endif
+TITLE=pam_rhosts_auth
-ifdef DYNAMIC
-LIBSESSSH =
-LIBAUTHSH = pam_rhosts_auth.so
-LIBPASSWDSH =
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBSHARED = $(LIBSESSSH) $(LIBAUTHSH) $(LIBPASSWDSH)
-endif
-
-ifeq ($(shell if [ -f /usr/include/fsuid.h ]; then echo yes ; fi),yes)
- CFLAGS += -DNEED_FSUID_H
-endif
-
-####################### don't edit below #######################
-
-dummy:
- @echo "**** This is not a top-level Makefile "
- exit
-
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; \
- ./register_static pam_rhosts_auth pam_rhosts/libpam_rhosts.o )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-endif
-
-ifdef DYNAMIC
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-endif
-
-ifdef STATIC
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-
-endif
-
-#.c.o:
-# $(CC) -c $(CFLAGS) $<
-
-install: all
-ifdef DYNAMIC
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-# tidy up
-
-remove:
- cd $(FAKEROOT)$(SECUREDIR) && rm -f $(LIBSHARED)
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) a.out core *~
-
-extraclean:
- rm -f *.a *.out *.o *.so *.bak dynamic/* static/*
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+include ../Simple.Rules
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:11:56 agmorgan
-# Imported 0.72 Linux-PAM sources
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-# Revision 1.1.1.1 1998/07/12 05:17:16 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.7 1997/04/05 06:25:20 morgan
-# fakeroot
-#
-# Revision 1.6 1997/02/15 19:15:50 morgan
-# fixed email
-#
-# Revision 1.5 1996/11/10 20:16:10 morgan
-# cross platform support
-#
-# Revision 1.4 1996/09/05 06:29:36 morgan
-# ld --> gcc
-#
-# Revision 1.3 1996/05/26 15:47:46 morgan
-# make dynamic/static dirs!
-#
-# Revision 1.2 1996/05/26 04:04:53 morgan
-# automated static support
-#
-# Revision 1.1 1996/05/05 17:14:15 morgan
-# Initial revision
-#
-#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/5/5
-#
-
-TITLE=pam_rootok
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+include ../../Make.Rules
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_rootok
+include ../Simple.Rules
#
+# $Id$
+#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-
-TITLE=pam_securetty
-
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
+include ../../Make.Rules
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
+TITLE=pam_securetty
-.c.o:
- $(CC) $(CFLAGS) -c $<
+include ../Simple.Rules
#
+# $Id$
+#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-
-TITLE=pam_shells
-
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
+include ../../Make.Rules
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_shells
+include ../Simple.Rules
#
# $Id$
#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/3/11
-#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:11:57 agmorgan
-# Imported 0.72 Linux-PAM sources
-#
-# Revision 1.1.1.1 1998/07/12 05:17:16 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.7 1997/04/05 06:23:08 morgan
-# fakeroot
-#
-# Revision 1.6 1997/02/15 19:05:55 morgan
-# fixed email
-#
-# Revision 1.5 1996/11/10 20:17:55 morgan
-# cross platform support
-#
-# Revision 1.4 1996/09/05 06:31:09 morgan
-# ld --> gcc
-#
-# Revision 1.3 1996/05/26 15:50:43 morgan
-# make dynamic and static dirs
-#
-# Revision 1.2 1996/05/26 04:11:56 morgan
-# automated static support
-#
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-#
-
-TITLE=pam_stress
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
+include ../../Make.Rules
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_stress
+include ../Simple.Rules
* created by Andrew Morgan <morgan@linux.kernel.org> 1996/3/12
*/
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdlib.h>
#include <stdio.h>
+
+#define __USE_BSD
#include <syslog.h>
+
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#
#
+include ../../Make.Rules
+
TITLE=pam_tally
#
####################### don't edit below #######################
-dummy:
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-# we're not yet in a position to build this. If you want it, build it
-# separately...
-# $(APPLICATION)
+all: dirs $(LIBSHARED) $(LIBSTATIC) register $(APPLICATION)
dirs:
ifdef DYNAMIC
clean:
rm -f $(LIBOBJD) $(LIBOBJS) $(APPOBJD) $(APPOBJS) core *~
-
-extraclean: clean
rm -f *.a *.o *.so *.bak dynamic/* static/* $(APPLICATION)
+ rm -rf dynamic static
.c.o:
$(CC) $(CFLAGS) -c $<
* Stuff stolen from pam_rootok and pam_listfile
*/
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdio.h>
#include <string.h>
#endif
static struct faillog faillog;
+#ifndef MAIN
static time_t fail_time;
+#endif /* ndef MAIN */
/*---------------------------------------------------------------------*/
-#
# $Id$
#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
-#
-# Created by Andrew Morgan <morgan@linux.kernel.org> 1996/6/11
-#
-
-TITLE=pam_time
-CONFD=$(CONFIGED)/security
-export CONFD
-CONFILE=$(CONFD)/time.conf
-export CONFILE
-
#
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
+include ../../Make.Rules
-DEFS=-DCONFILE=\"$(CONFILE)\"
+TITLE=pam_time
+LOCAL_CONFILE=./time.conf
+INSTALLED_CONFILE=$(SCONFIGD)/time.conf
+DEFS=-DDEFAULT_CONF_FILE=\"$(INSTALLED_CONFILE)\"
CFLAGS += $(DEFS)
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-
-####################### don't edit below #######################
-
-dummy:
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
-ifdef DYNAMIC
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
- $(MKDIR) $(FAKEROOT)$(SCONFIGED)
- bash -f ./install_conf
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
- rm -f $(FAKEROOT)$(CONFILE)
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
- rm -f ./.ignore_age
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+MODULE_SIMPLE_INSTALL=bash -f ../install_conf "$(FAKEROOT)" "$(SCONFIGD)" "$(INSTALLED_CONFILE)" "$(TITLE)" "$(LOCAL_CONFILE)"
+MODULE_SIMPLE_REMOVE=rm -f $(FAKEROOT)$(INSTALLED_CONFILE)
+MODULE_SIMPLE_CLEAN=rm -f ./.ignore_age
+include ../Simple.Rules
"\t\tVersion 0.22 for Linux-PAM\n"
"Copyright (C) Andrew G. Morgan 1996 <morgan@linux.kernel.org>\n";
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <sys/file.h>
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
-#define PAM_TIME_CONF CONFILE /* from external define */
+#ifdef DEFAULT_CONF_FILE
+# define PAM_TIME_CONF DEFAULT_CONF_FILE /* from external define */
+#else
+# define PAM_TIME_CONF "/etc/security/time.conf"
+#endif
#define PAM_TIME_BUFLEN 1000
#define FIELD_SEPARATOR ';' /* this is new as of .02 */
# for Linux-PAM. You should not modify this Makefile.
#
+include ../../Make.Rules
+
########################################################################
# some options... uncomment to take effect
########################################################################
+# Unless someone wants to work out how to make this work with the new
+# autoconf stuff, you should use a separate module for this type of thing
+# pam_cracklib perhaps..?
# do you want cracklib?
-ifeq ($(HAVE_CRACKLIB),yes)
-USE_CRACKLIB=-D"USE_CRACKLIB"
-endif
+#ifeq ($(HAVE_CRACKLIB),yes)
+#USE_CRACKLIB=-D"USE_CRACKLIB"
+#endif
# do you want to use lckpwdf?
+ifeq ($(WITH_LCKPWDF),yes)
USE_LCKPWDF=-D"USE_LCKPWDF"
-
# do you need to include the locking functions in the source?
-#NEED_LCKPWDF=-D"NEED_LCKPWDF"
+ifeq ($(HAVE_LCKPWDF),no)
+ NEED_LCKPWDF=-D"NEED_LCKPWDF"
+endif
+endif
+
+ifeq ($(HAVE_LIBNSL),yes)
+ LIBNSL = -lnsl
+endif
-ifeq ($(shell ./need_nsl.sh),yes)
-LIBNSL = -lnsl
+ifeq ($(HAVE_LIBCRYPT),yes)
+ LIBCRYPT=-lcrypt
endif
CHKPWD=unix_chkpwd
$(LIBOBJD): $(LIBSRC)
$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(PLUS) $(CRACKLIB) $(LDLIBS) $(LIBNSL)
+ $(LD_D) -o $@ $(LIBOBJD) $(PLUS) $(CRACKLIB) $(LDLIBS) $(LIBNSL) $(LIBCRYPT)
endif
ifdef STATIC
$(LIBOBJS): $(LIBSRC)
$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS) $(PLUS) $(CRACKLIB) $(LDLIBS) $(LIBNSL)
+ $(LD) -r -o $@ $(LIBOBJS) $(PLUS) $(CRACKLIB) $(LDLIBS) $(LIBNSL) $(LIBCRYPT)
endif
$(CHKPWD): unix_chkpwd.o md5_good.o md5_broken.o \
md5_crypt_good.o md5_crypt_broken.o \
bigcrypt.o
- $(CC) -o $(CHKPWD) $^ $(LDLIBS)
+ $(CC) -o $(CHKPWD) $^ $(LDLIBS) $(LIBCRYPT)
unix_chkpwd.o: unix_chkpwd.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
mkdir -p $(FAKEROOT)$(SECUREDIR)
ifdef DYNAMIC
install -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
- ln -sf $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)/pam_unix_auth.so
- ln -sf $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)/pam_unix_acct.so
- ln -sf $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)/pam_unix_passwd.so
- ln -sf $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)/pam_unix_session.so
+ for x in pam_unix_auth pam_unix_acct pam_unix_passwd pam_unix_session;\
+ do ln -sf $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)/$$x.so ; done
endif
install $(CHKPWD) $(FAKEROOT)$(SUPLEMENTED)
remove:
- cd $(FAKEROOT)$(SECUREDIR) && rm -f $(LIBSHARED)
+ rm -f $(FAKEROOT)$(SECUREDIR)/$(LIBSHARED)
+ for x in pam_unix_auth pam_unix_acct pam_unix_passwd pam_unix_session;\
+ do rm -f $(FAKEROOT)$(SECUREDIR)/$$x.so ; done
rm -f $(FAKEROOT)$(SUPLEMENTED)/$(CHKPWD)
clean:
rm -f $(LIBOBJD) $(LIBOBJS) $(CHKPWD) *.o *.so core
-
-extraclean: clean
rm -f *~ *.a *.out *.bak
+ rm -rf dynamic static
.c.o:
$(CC) -c $(CFLAGS) $<
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define _BSD_SOURCE
-
-#ifdef linux
-#define _GNU_SOURCE
-#include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdlib.h>
#include <stdio.h>
#include <shadow.h>
#include <time.h> /* for time() */
-
#include <security/_pam_macros.h>
/* indicate that the following groups are defined */
/* #define DEBUG */
-#ifdef linux
-#define _GNU_SOURCE
-#include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdio.h>
#include <stdlib.h>
#define AUTH_RETURN \
{ \
- if (on(UNIX_LIKE_AUTH, ctrl)) { \
+ if (on(UNIX_LIKE_AUTH, ctrl) && ret_data) { \
D(("recording return code for next time [%d]", \
retval)); \
pam_set_data(pamh, "unix_setcred_return", \
- (void *) &retval, NULL); \
+ (void *) retval, NULL); \
} \
D(("done. [%s]", pam_strerror(pamh, retval))); \
return retval; \
,int argc, const char **argv)
{
unsigned int ctrl;
- int retval;
+ int retval, *ret_data = NULL;
const char *name, *p;
D(("called."));
ctrl = _set_ctrl(flags, NULL, argc, argv);
+ /* Get a few bytes so we can pass our return value to
+ pam_sm_setcred(). */
+ ret_data = malloc(sizeof(int));
+
/* get the user'name' */
retval = pam_get_user(pamh, &name, "login: ");
retval = PAM_SUCCESS;
if (on(UNIX_LIKE_AUTH, ctrl)) {
- int *pretval = &retval;
+ int *pretval = NULL;
D(("recovering return code from auth call"));
- pam_get_data(pamh, "unix_setcred_return", (const void **) &pretval);
- pam_set_data(pamh, "unix_setcred_return", NULL, NULL);
- D(("recovered data indicates that old retval was %d", retval));
+ pam_get_data(pamh, "unix_setcred_return", (const void **) pretval);
+ if(pretval) {
+ retval = *pretval;
+ free(pretval);
+ D(("recovered data indicates that old retval was %d", retval));
+ }
}
return retval;
}
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define _BSD_SOURCE
-#define __USE_SVID
-
-#ifdef linux
-#define _GNU_SOURCE
-#include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <unistd.h>
#include <errno.h>
+#include <sys/types.h>
#include <pwd.h>
#include <syslog.h>
#include <shadow.h>
#include <fcntl.h>
#include <ctype.h>
#include <sys/time.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <rpc/rpc.h>
#include <rpcsvc/yp_prot.h>
int argc, const char **argv)
{
unsigned int ctrl, lctrl;
- int retval;
+ int retval, i;
int remember = -1;
/* <DO NOT free() THESE> */
/* our current locking system requires that we lock the
entire password database. This avoids both livelock
and deadlock. */
- lckpwdf();
+ /* These values for the number of attempts and the sleep time
+ are, of course, completely arbitrary.
+ My reading of the PAM docs is that, once pam_chauthtok() has been
+ called with PAM_UPDATE_AUTHTOK, we are obliged to take any
+ reasonable steps to make sure the token is updated; so retrying
+ for 1/10 sec. isn't overdoing it.
+ The other possibility is to call lckpwdf() on the first
+ pam_chauthtok() pass, and hold the lock until released in the
+ second pass--but is this guaranteed to work? -SRL */
+ i=0;
+ while((retval = lckpwdf()) != 0 && i < 100) {
+ usleep(1000);
+ }
+ if(retval != 0) {
+ return PAM_AUTHTOK_LOCK_BUSY;
+ }
#endif
ctrl = _set_ctrl(flags, &remember, argc, argv);
/*
+ * $Id$
+ *
* Copyright Alexander O. Yuriev, 1996. All rights reserved.
* Copyright Jan Rêkorajski, 1999. All rights reserved.
*
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef linux
-#define _GNU_SOURCE
-#include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdio.h>
#include <stdlib.h>
D(("user has empty password - access denied"));
retval = PAM_AUTH_ERR;
}
+ } else if (!p) {
+ retval = PAM_AUTH_ERR;
} else {
if (!strncmp(salt, "$1$", 3)) {
pp = Goodcrypt_md5(p, salt);
+/*
+ * $Id$
+ */
+
#ifndef _PAM_UNIX_SUPPORT_H
#define _PAM_UNIX_SUPPORT_H
*
*/
-#define _BSD_SOURCE
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdarg.h>
#include <stdio.h>
* editied manually.
*/
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <rpc/rpc.h>
#include <rpcsvc/yp_prot.h>
# $Id$
# Created by Cristian Gafton <gafton@redhat.com>
-WHICH_DB=$(shell ./libdbfound.sh)
-ifeq ($(WHICH_DB),none)
-
-include ../dont_makefile
-
-else
+include ../../Make.Rules
TITLE=pam_userdb
-LIBSRC = $(TITLE).c conv.c
-LIBOBJ = $(TITLE).o conv.o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-#LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-EXTRALS += -ldb
-CFLAGS += $(WHICH_DB)
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-#static/%.o : %.c
-# $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
+ifeq ($(HAVE_LIBDB),yes)
+ WHICH_DB=db
+ MODULE_SIMPLE_EXTRALIBS = -ldb
+else
+ifeq ($(HAVE_LIBNDBM),yes)
+ WHICH_DB=ndbm
+ MODULE_SIMPLE_EXTRALIBS = -lndbm
+else
+ WHICH_DB=none
endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(EXTRALS)
endif
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~ *.so
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
+ifeq ($(WHICH_DB),none)
-.c.o:
- $(CC) $(CFLAGS) -c $<
+include ../dont_makefile
-.PHONY: register
+else
-test:
- install -m 755 $(TITLE).so /tmp
+include ../Simple.Rules
endif
* See the end of the file for Copyright Information
*/
-#define _GNU_SOURCE
-#define _BSD_SOURCE
+#include <security/_pam_aconf.h>
-#include <features.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "pam_userdb.h"
-#ifdef USE_NDBM_H
-# include <ndbm.h>
-#else /* USE_NDBM_H */
+#ifdef HAVE_LIBDB
# define DB_DBM_HSEARCH 1 /* use the dbm interface */
# include <db.h>
-#endif /* USE_NDBM_H */
+#else
+# ifdef HAVE_LIBNDBM
+# include <ndbm.h>
+# else
+# error "failed to find a libdb or equivalent"
+# endif
+#endif
/*
* here, we make a definition for the externally accessible function
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1.1.1 2000/06/20 22:12:10 agmorgan
-# Imported 0.72 Linux-PAM sources
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-# Revision 1.1.1.1 1998/07/12 05:17:17 morgan
-# Linux PAM sources pre-0.66
-#
-# Revision 1.2 1997/04/05 06:20:16 morgan
-# fixed fakeroot
-#
-# Revision 1.1 1996/12/01 03:12:22 morgan
-# Initial revision
-#
-#
-# Created by Andrew Morgan <morgan@parc.power.net> 1996/11/14
-#
-
-TITLE=pam_warn
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-static/%.o : %.c
- $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-ifdef STATIC
-LIBSTATIC = lib$(TITLE).o
-endif
-####################### don't edit below #######################
+include ../../Make.Rules
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
-
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-ifdef STATIC
- $(MKDIR) ./static
-endif
-
-register:
-ifdef STATIC
- ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD)
-endif
-
-ifdef STATIC
-$(LIBOBJS): $(LIBSRC)
-
-$(LIBSTATIC): $(LIBOBJS)
- $(LD) -r -o $@ $(LIBOBJS)
-endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_warn
+include ../Simple.Rules
#
+# $Id$
+#
# This Makefile controls a build process of $(TITLE) module for
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# Created by Cristian Gafton <gafton@sorosis.ro> 1996/09/10
+# Created by Andrew Morgan <morgan@linux.kernel.org> 2000/08/27
#
-TITLE=pam_wheel
-
-#
-
-LIBSRC = $(TITLE).c
-LIBOBJ = $(TITLE).o
-LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
-#LIBOBJS = $(addprefix static/,$(LIBOBJ))
-
-dynamic/%.o : %.c
- $(CC) $(CFLAGS) $(DYNAMIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-#static/%.o : %.c
-# $(CC) $(CFLAGS) $(STATIC) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-
-
-ifdef DYNAMIC
-LIBSHARED = $(TITLE).so
-endif
-
-#ifdef STATIC
-#LIBSTATIC = lib$(TITLE).o
-#endif
-
-####################### don't edit below #######################
-
-dummy:
-
- @echo "**** This is not a top-level Makefile "
- exit
+include ../../Make.Rules
-all: dirs $(LIBSHARED) $(LIBSTATIC) register
-
-dirs:
-ifdef DYNAMIC
- $(MKDIR) ./dynamic
-endif
-#ifdef STATIC
-# $(MKDIR) ./static
-#endif
-
-register:
-#ifdef STATIC
-# ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) )
-#endif
-
-ifdef DYNAMIC
-$(LIBOBJD): $(LIBSRC)
-
-$(LIBSHARED): $(LIBOBJD)
- $(LD_D) -o $@ $(LIBOBJD) $(EXTRALS)
-endif
-
-#ifdef STATIC
-#$(LIBOBJS): $(LIBSRC)
-#
-#$(LIBSTATIC): $(LIBOBJS)
-# $(LD) -r -o $@ $(LIBOBJS) $(EXTRALS)
-#endif
-
-install: all
- $(MKDIR) $(FAKEROOT)$(SECUREDIR)
-ifdef DYNAMIC
- $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
-endif
-
-remove:
- rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so
-
-clean:
- rm -f $(LIBOBJD) $(LIBOBJS) core *~ *.so
-
-extraclean: clean
- rm -f *.a *.o *.so *.bak dynamic/* static/*
-
-.c.o:
- $(CC) $(CFLAGS) -c $<
+TITLE=pam_wheel
+include ../Simple.Rules