]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: task 15788, bugs 108297, 117476, 117474 Linux-PAM-0-73pre-autoconf
authorAndrew G. Morgan <morgan@kernel.org>
Sun, 19 Nov 2000 23:31:22 +0000 (23:31 +0000)
committerAndrew G. Morgan <morgan@kernel.org>
Sun, 19 Nov 2000 23:31:22 +0000 (23:31 +0000)
Purpose of commit: merge in the autoconf stuff

Commit summary:
---------------
this is a merge of the 0-72 autoconf branch to something more
up to date. This commit will be followed by merging this
Linux-PAM-0-73pre-autoconf branch to the main trunk.

78 files changed:
.cvsignore
CHANGELOG
Makefile
README
doc/Makefile
doc/pam_source.sgml
doc/ps/.cvsignore
examples/Makefile
examples/xsh.c
libpam/Makefile
libpam/include/security/_pam_types.h
libpam/include/security/pam_appl.h
libpam/pam_log.c
libpam/pam_private.h
libpam_misc/.cvsignore
libpam_misc/Makefile
libpam_misc/misc_conv.c
libpamc/Makefile
libpamc/include/security/pam_client.h
libpamc/libpamc.h
modules/Makefile
modules/README
modules/dont_makefile
modules/pam_access/Makefile
modules/pam_access/pam_access.c
modules/pam_cracklib/Makefile
modules/pam_deny/Makefile
modules/pam_env/Makefile
modules/pam_env/pam_env.c
modules/pam_filter/Makefile
modules/pam_filter/pam_filter.c
modules/pam_filter/upperLOWER/Makefile
modules/pam_filter/upperLOWER/upperLOWER.c
modules/pam_ftp/Makefile
modules/pam_ftp/pam_ftp.c
modules/pam_group/Makefile
modules/pam_group/pam_group.c
modules/pam_issue/Makefile
modules/pam_lastlog/Makefile
modules/pam_lastlog/pam_lastlog.c
modules/pam_limits/Makefile
modules/pam_limits/pam_limits.c
modules/pam_listfile/Makefile
modules/pam_listfile/pam_listfile.c
modules/pam_mail/Makefile
modules/pam_mail/pam_mail.c
modules/pam_mkhomedir/Makefile
modules/pam_motd/Makefile
modules/pam_nologin/Makefile
modules/pam_permit/Makefile
modules/pam_pwdb/Makefile
modules/pam_pwdb/pam_pwdb.c
modules/pam_pwdb/pwdb_chkpwd.c
modules/pam_radius/Makefile
modules/pam_radius/pam_radius.h
modules/pam_rhosts/Makefile
modules/pam_rootok/Makefile
modules/pam_securetty/Makefile
modules/pam_shells/Makefile
modules/pam_stress/Makefile
modules/pam_stress/pam_stress.c
modules/pam_tally/Makefile
modules/pam_tally/pam_tally.c
modules/pam_time/Makefile
modules/pam_time/pam_time.c
modules/pam_unix/Makefile
modules/pam_unix/pam_unix_acct.c
modules/pam_unix/pam_unix_auth.c
modules/pam_unix/pam_unix_passwd.c
modules/pam_unix/pam_unix_sess.c
modules/pam_unix/support.c
modules/pam_unix/support.h
modules/pam_unix/unix_chkpwd.c
modules/pam_unix/yppasswd_xdr.c
modules/pam_userdb/Makefile
modules/pam_userdb/pam_userdb.c
modules/pam_warn/Makefile
modules/pam_wheel/Makefile

index 31265a3fe45e672b50e7b0443e4c69c183add07e..4cae323b468a3a092382d9a737d706faff3d3f66 100644 (file)
@@ -1,4 +1,9 @@
 default.defs
 .freezemake
 .filelist
-include
\ No newline at end of file
+include
+config.status
+config.log
+config.cache
+_pam_aconf.h
+Make.Rules
index 59da5b64c34144c9581351affdaff81b9bdb053a..7dbf8129d1819dcf44d4915203d6889835df41f9 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,7 +5,6 @@ $Id$
 
 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.
@@ -21,15 +20,36 @@ TODO:
   - 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
 
index 7a5923e7778fc6815166b2ea906febfb2549db95..c17dc2080099e02b2e2230bf47a62e7a33b65add 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,68 @@
 ##
 ## $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
@@ -281,3 +342,5 @@ release:
        chmod 400 .filelist
        $(MAKE) check
        (cat .filelist ; echo $(RELNAME)/conf/.md5sum) | (cd .. ; tar -cz -f$(DISTFILE) -T-)
+
+endif # LEGACY_OLD_MAKEFILE
diff --git a/README b/README
index 8f98821334242a3ba7048cee177113bd8c363fc4..c9d39bbabce8184de36f0c2bd43c52c8354edcc3 100644 (file)
--- a/README
+++ b/README
@@ -6,162 +6,23 @@ Hello!
 
 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>
index 965f24b824772d12690951c628b905bcf34f8a0c..21ae3de23a0a5f0205bb78eca8a00f5fd38e62dd 100644 (file)
@@ -1,13 +1,13 @@
 
 ### $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
@@ -29,36 +29,48 @@ all: htmls texts postscript
 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'
@@ -70,25 +82,48 @@ MODULES-SGML: $(MODULES)
 
 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:
@@ -96,6 +131,6 @@ 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
 
index 1c3694034d5aa4e993d6f4085be907dc52b7ed5d..346082b019669c0faae8bbdf8879080a6bb35b28 100644 (file)
@@ -45,8 +45,8 @@ DAMAGE.
 <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
@@ -1046,57 +1046,9 @@ and in such a way that they need not be distributed with Linux-PAM.
 <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
index 8d83f2d035812b72a6da3c1e7825959d7e3083ea..fa1d1137827162a6711c473dc6aef2dc7cba99ac 100644 (file)
@@ -1 +1 @@
-pam*.ps
\ No newline at end of file
+pam*.ps
index c6882473727a45698aa53517b9a61a06d52c77a3..bd15ddf21316fb5f83afdeba7f106c771f9f8c9e 100644 (file)
@@ -2,18 +2,15 @@
 # $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)
 
@@ -26,17 +23,18 @@ blank: blank.o
 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
index 2a892750cab1142c5ad562c64814e7632bed16a4..13971a2db35a0b543dd27e1224935b824e0c8757 100644 (file)
@@ -1,31 +1,8 @@
 /*
  * $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>
@@ -53,7 +30,7 @@ static struct pam_conv conv = {
 
 /* ------- 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;
index 66b2a705ab792dc5e3a21e0d5b72784bf9ead908..b734dfa421c91b8d0e3bba93012110605e011a95 100644 (file)
@@ -3,28 +3,12 @@
 #
 #
 
+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
@@ -34,8 +18,7 @@ MODIFICATION=.$(MINOR_REL)
 
 # ---------------------------------------------
 
-dummy:
-       @echo "*** This is not a top-level Makefile!"
+dummy: ../Make.Rules all
 
 # ---------------------------------------------
 
@@ -52,6 +35,7 @@ LIBPAMFULL = $(LIBPAMNAME)$(MODIFICATION)
 LIBPAMSTATIC = $(LIBNAME).a
 
 ifdef STATIC
+@echo Did you mean to set STATIC\?
 MODULES = $(shell cat ../modules/_static_module_objects)
 STATICOBJ = pam_static.o
 endif
@@ -65,15 +49,16 @@ LIBOBJECTS = pam_item.o pam_strerror.o pam_end.o pam_start.o pam_data.o \
                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
@@ -84,28 +69,29 @@ endif
 # ---------------------------------------------
 ## 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)
@@ -116,13 +102,13 @@ ifdef DYNAMIC_LIBPAM
 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)
@@ -131,15 +117,16 @@ install: all
 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:
@@ -148,15 +135,13 @@ 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
index fe4ada396740429322262272b3f8cf99c01ee776..f192409e225706d88b296269c76e5c9267c9ed1d 100644 (file)
@@ -175,7 +175,7 @@ extern char **pam_getenvlist(pam_handle_t *pamh);
  * 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
index 2849970a9f93cdb96d4cb73a1d7d595b139039ad..b2eeb9f0efd8fec09b2724a7827b190576bb4775 100644 (file)
 #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);
index d990c8c044eed221facc7da64d484edc6d312f80..af6f2504d38b75491cf84e1a46b897c542f45e0d 100644 (file)
@@ -5,19 +5,12 @@
  *
  */
 
-#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>
index 51660fd16343b656c0fe93c569e02eeae82688dd..7b36fb02c4c912d37c54f5bca673b7925deaf4da 100644 (file)
  * 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>
@@ -188,8 +190,6 @@ int _pam_make_env(pam_handle_t *pamh);
 /* 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
@@ -204,9 +204,6 @@ void _pam_start_timer(pam_handle_t *pamh);
 /* 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
 
index d04bebe5d59d40f73b44b319d2ba3e07c213f222..b6cfd74265376625d021eac2e7892d8a95e62f4d 100644 (file)
@@ -5,3 +5,5 @@ libpamd_misc.a
 help_env.o
 misc_conv.o
 xstrdup.o
+dynamic
+static
index 89a27536dcec12abd0c548603671d2b3a0b60238..b41e61a0ae97d8717e7aa912c20562827b60fbb2 100644 (file)
+#
 # $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
index f2811a2626b5f35aa3fd815d3c6e22c7b56fa418..73ba5a83aeb180b9e5036c43fd4db3c584b92517 100644 (file)
@@ -6,10 +6,7 @@
  * 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>
index 6052e96e9f1ce48e6689437db27f7d7bd272130f..402f070f2352462648bb2c2f7a8e2115d068ba2e 100644 (file)
@@ -5,6 +5,8 @@
 # lots of debugging information goes to /tmp/pam-debug.log
 #MOREFLAGS += -D"DEBUG"
 
+include ../Make.Rules
+
 ifeq ($(DEBUG_REL),yes)
  LIBNAME=libpamcd
 else
@@ -13,71 +15,64 @@ endif
 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
@@ -85,26 +80,28 @@ 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
+
index 4995e66773a40684cb7493e36aa09e9cea2cff65..723dd88d6076690f936862f70f2870d7213293ff 100644 (file)
@@ -90,7 +90,7 @@ char **pamc_list_agents(pamc_handle_t pch);
 #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)+      \
index 15662cc34ab4302309c315e927847f616c7b2a53..93c833c6d1276de079f32ce1b8906391d37719ab 100644 (file)
@@ -9,7 +9,7 @@
 #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>
index 9b89ccfd4f35336c6fd6c777a68d38f69afe603d..51964e5bf1e94ab0446a5c3a18d4e9316cf996f1 100644 (file)
@@ -6,19 +6,12 @@
 #
 #
 
-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
@@ -61,10 +54,3 @@ clean: lclean
                } fi ; \
        done 
 
-extraclean: lclean
-       for i in $(MODDIRS) ; do \
-               if [ -d $$i ]; then \
-                       $(MAKE) -C $$i extraclean ; \
-               fi ; \
-       done
-
index 864159478c65d012234595aa1e3ee3678be9efb7..73d3cf0c2e49c76156197d0efd1d2637f4f2f4f0 100644 (file)
@@ -1,7 +1,7 @@
 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
index f256ce1b3a61cd73422b2717159ea3399a68e751..b7e1183476756fd620f792c134af88c091e2e0d0 100644 (file)
@@ -1,4 +1,6 @@
 #########################################################################
+# $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
@@ -7,7 +9,7 @@
 all:
        @echo "This module will not be compiled on this system"
 
-extraclean: clean
+remove: clean
 
 install: clean
 
index 3d3611c48e2791d6c56e47ad24dcd1db18b1b829..d93c9f4062708749d1b5c01cb395a6c8fb49af19 100644 (file)
 # 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
index 121333928a264015c18776a5f7165c94cd62ac76..b87226463711698ac9fc46ee80a4b4f418514b3c 100644 (file)
@@ -7,10 +7,7 @@
  *
  */
 
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -59,7 +56,11 @@ static void _log_err(const char *format, ... )
     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);
 
index 554362d46fcf170b3a33e3e7800efd145499a713..c279857cc3fb1b9be15c192e3f23aaa13daac5a4 100644 (file)
 #
+# $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
index 5caef6bf73609101e7b72083738438656d0a6270..7dd7b4fd9bc7cd80eec02c4872c1c74ac6bacfe6 100644 (file)
 # 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
index 472400a396201125310686ecb3c1d1bfb53aea1b..fa711ce35cf65324ea599d2eb23deff6027a2996 100644 (file)
 # 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
index 5ba892682c5a811e8eadf590e69e5089ac4b0bdc..f140f3cb49b704a4285e65a95089fb86e6029b85 100644 (file)
 #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>
index f4db56a9c555eae66d4dc8f99a1afe0d3b8cb4ab..971816635e1846ed811b262f952ad57e5cb1b3b4 100644 (file)
@@ -14,13 +14,14 @@ include ../dont_makefile
 
 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
@@ -43,10 +44,6 @@ endif
 
 ####################### don't edit below #######################
 
-dummy:
-       @echo "**** This is not a top-level Makefile "
-       exit
-
 #
 # this is where we compile this module
 #
@@ -54,7 +51,7 @@ dummy:
 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
@@ -93,6 +90,15 @@ $(LIBSTATIC): $(LIBOBJS)
        $(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 \
@@ -106,35 +112,15 @@ endif
        $(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
index a1ba10b00a91b86b8645225a30af97bae891a0af..f67ec0d28634c61fce0096891d1012bc1355d3a7 100644 (file)
@@ -5,10 +5,7 @@
  * 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>
index 9ec8ee80b9200a82acec4d4f0eb78f7583176c87..6db8d6e34c0eda366407fa87e65c07634229eb71 100644 (file)
@@ -1,50 +1,28 @@
 #
 # $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)
@@ -56,9 +34,6 @@ remove:
 clean:
        rm -f $(TITLE) $(OBJS) core *~
 
-extraclean: clean
-       rm -f *.bak
-
 .c.o:  
        $(CC) $(CFLAGS) -c $<
 
index c66d15c31550db6f8dc04ae73c665c4b1d88f832..c85a950ab7bfa3899773f8ede537cf60dd279488 100644 (file)
@@ -5,26 +5,9 @@
  * 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>
@@ -66,7 +49,9 @@ static void do_transpose(char *buffer,int len)
      }
 }
 
-int main(int argc, char **argv, char **envp) 
+extern char **environ;
+
+int main(int argc, char **argv) 
 {
      char buffer[BUFSIZ];
      fd_set readers;
@@ -78,8 +63,8 @@ int main(int argc, char **argv, char **envp)
          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");
      }
index 0ce77a7a371d154ec5e45dc8aab21f92856e0e7e..fb61ac16d411a8b466ea80bfe5cabf5b42e24558 100644 (file)
@@ -5,84 +5,11 @@
 # 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
index eb2c3fd97d33529d36022591109cbf54c9c8f458..bebcd2b2bf9bd0adb1dcca0e0781d71d31c74ba6 100644 (file)
 /* 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>
index b61a57deba86806280b37bc284a21f86f6d24b80..cb3c4c89ec4b0f7c5e061b557501fce77f31a4e0 100644 (file)
@@ -1,98 +1,21 @@
-#
 # $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
index 81953f76743a1cf963ecf8d66338094bafe014a7..2b820df2011b59ce46c4c5aca6aad9520531c7c4 100644 (file)
@@ -28,7 +28,11 @@ const static char rcsid[] =
 #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 */
 
index 6770ef3626ed759fc3983123243552c3435abe60..d73710e197361b7f5b022f608c788b85063e7b63 100644 (file)
@@ -1,86 +1,15 @@
 #
+# $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
index 7267c34a52ebdcc6af91165709b9f6535c55ba79..31035a99a754a873d0ad2b4c5788cb2eabe4cbfa 100644 (file)
 # 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
index 7207976e37329bbcdaac12cbe14a39da0bc51821..05c3c083d1ffc305420334ef5342591c4646caff 100644 (file)
  * present (login) service.
  */
 
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
 
 #include <fcntl.h>
 #include <time.h>
@@ -28,6 +25,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
+#define __USE_BSD
 #include <syslog.h>
 #include <unistd.h>
 
index fe6848632d4030a2a12a248500101c1ea9e6b4cc..9473d915847d3fefd9686faa7f4477290f2b43a9 100644 (file)
@@ -1,98 +1,31 @@
 #
+# $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
index e832dc63009695be72abf0c95bc6645346c33469..8ecb56823ce5b09627400962ece2c32a97193d84 100644 (file)
 #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>
@@ -119,8 +116,10 @@ static int _pam_parse(int argc, const char **argv)
 
 
 /* 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 */
index 02940390b333ccc0542a83900de662f89176d0eb..183152568f556fb13a783cfcc5272e070d67c33c 100644 (file)
@@ -1,84 +1,15 @@
 #
+# $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
index 8b1b45f06e98d2077fd7822fc1f548fbdc6f7c2a..5a8c83e0e92b3f1d48a2076d0c4164e641f24faa 100644 (file)
  * 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>
index ebacd91f9082356c583a41506e80cb417d3171f8..93ca429b34cd9ef875c0f069bbab180c0730129b 100644 (file)
 # 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
index f67b6f02147b3578a2bb89f1414b4b68405bee25..4f1152b3c16bbebf7be66491e0f60b0e34734778 100644 (file)
 #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>
index 7c9f5d3a31c14f0241e09aa1f41020c9929c1bba..d518c26f69a75a59607dcb42daa3cc910fa550b3 100644 (file)
@@ -5,86 +5,11 @@
 # 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
index ef9f31131d854b75536007bc7ecf683d20c1af05..ae4acb8cb81a5306a7ecbe8af237ab0d2c971eea 100644 (file)
@@ -5,86 +5,11 @@
 # 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
index 03d779bf0bead1b3aa0e163a3f8375fa3a2cca2a..130787e730754a3192977e5620aa846ce1106283 100644 (file)
@@ -1,86 +1,15 @@
 #
+# $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
index 904e84d7736aa88865677ea83f43f722c97d22fc..b4cc3b5ba0a5e49315bdd038e31fbda14e962a1c 100644 (file)
 # 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
index 63c5dad69104f0789fe17ef5f8b4140970731b49..2b581dcd366ec46c605710d029319c1b8d5470c3 100644 (file)
@@ -7,46 +7,20 @@
 # <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))
@@ -132,7 +106,7 @@ ifdef DYNAMIC
        $(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
@@ -140,54 +114,11 @@ remove:
 
 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
-#
-#
index 68ca68fd07f30590c82896add43b0c59ac2bc441..d736c6a87c99205ca8c661df05b6e93fcda43d29 100644 (file)
@@ -20,14 +20,7 @@ static const char rcsid[] =
 
 /* #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>
@@ -83,7 +76,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags
 
     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)));
@@ -108,8 +101,7 @@ PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags
        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));
     }
 
index 2c7ba29c6d50f87478cf90b4a1e9eadefe48974e..fdd3cfa32819d12b881d5e1faa6c5e9b855998dc 100644 (file)
  *
  */
 
-#define _BSD_SOURCE
-
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
 
 #include <stdarg.h>
 #include <stdio.h>
index a74b911f4e3b9084a8217fd982e1e39aa298b716..aa149d3ee9b535592189b97014c310bc5bab2bc1 100644 (file)
@@ -8,13 +8,15 @@
 # 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)
 
 #
 
@@ -41,11 +43,6 @@ endif
 
 ####################### don't edit below #######################
 
-dummy:
-
-       @echo "**** This is not a top-level Makefile "
-       exit
-
 all: dirs $(LIBSHARED) $(LIBSTATIC) register
 
 dirs:
@@ -85,9 +82,8 @@ remove:
 
 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 $<
index 1f860eb56426adebd6ec2e035b722445286bb066..8cee7ff1fb11a595ea7de139e8b8905cbf1c64d5 100644 (file)
@@ -1,9 +1,11 @@
+/*
+ * $Id$
+ */
 
 #ifndef PAM_RADIUS_H
 #define PAM_RADIUS_H
 
-#define _GNU_SOURCE
-#include <features.h>
+#include <security/_pam_aconf.h>
 
 #include <stdio.h>
 
index 431842b21d77f6b7b2acf2f290765e7a2630a327..46d75d6aff097052594f2641c5a6cd538eda29d7 100644 (file)
@@ -1,98 +1,15 @@
-# 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
index 2fd404f3d317c1a01beaef0fc220ac0a1dd81ef8..3460c2a23412dd90f977e44d80cb2b326cf32f1e 100644 (file)
 # 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
index d8a09ea13377bdf4c8027fa8e6c02bd57f9294ce..9b80d2e96b6d58baed371de4b7d76a5e61676eb7 100644 (file)
@@ -1,83 +1,15 @@
 #
+# $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
index 121b19a008638825ca4dfd93a855b0a68dac0cbc..b057dc0000b759be8326fe8c5048d13266169f4b 100644 (file)
@@ -1,84 +1,15 @@
 #
+# $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
index d5fbb5e3895e39e26cdef850151d004c08799282..598809a542533a484a61f587cb7115f905f4ecc7 100644 (file)
 #
 # $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
index e581357961a1236c4d11b381187a9155399537b0..f5126fd21ae3eacb34669d2a1b84e61696af82cc 100644 (file)
@@ -5,14 +5,14 @@
  * 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>
index 78ce621d85be79d824dffb7c0af68aaebdb9e668..7949b5586ce6a6262b481ef26da4c69377a48777 100644 (file)
@@ -7,6 +7,8 @@
 #
 #
 
+include ../../Make.Rules
+
 TITLE=pam_tally
 
 #
@@ -44,14 +46,7 @@ APPMODE = 755
 
 ####################### 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
@@ -101,9 +96,8 @@ remove:
 
 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 $<
index ff75697db640c4121e2a109f46e58034b221d72a..436ce956a475ba6d2e4055a5056d2d38a9eb62f4 100644 (file)
  * 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>
@@ -70,7 +67,9 @@ enum TALLY_RESET {
 #endif
 
 static struct faillog faillog;
+#ifndef MAIN
 static time_t fail_time;
+#endif /* ndef MAIN */
 
 /*---------------------------------------------------------------------*/
 
index 03105bb1b4d2af875662fd61b8f0b3556d6af7cb..9c2d0eb3da4770cce2cf7aa1d8e0e45b37b280f3 100644 (file)
@@ -1,98 +1,21 @@
-#
 # $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
index 2ca518590120c34105d6c1a9dbc85d9da3ffdd0b..b3ce0df958ba1378c01c7910b090b44f4562476f 100644 (file)
@@ -13,10 +13,7 @@ const static char rcsid[] =
 "\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>
@@ -31,7 +28,11 @@ const static char rcsid[] =
 #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 */
 
index 89b33cfd54b1cf1ae6be006760e98747b156c475..dc0b6ac2a756cb3a696586c6d32bd682a0e536c1 100644 (file)
@@ -4,23 +4,35 @@
 # 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
@@ -95,20 +107,20 @@ ifdef DYNAMIC
 $(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 $@
@@ -133,22 +145,21 @@ install: all
        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) $<
index f86f56e50853157387037fe1a141d96343b321d9..8aeb43f3d1250df0a07c6f61d10a93e5b2c86502 100644 (file)
  * 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>
@@ -51,7 +46,6 @@
 #include <shadow.h>
 #include <time.h>              /* for time() */
 
-
 #include <security/_pam_macros.h>
 
 /* indicate that the following groups are defined */
index 3c301df0761a3ed6a347e1d0df1c760f99c1e73d..bec9d99f43aed0f97e9a910cee0b824ce7ac2f3b 100644 (file)
 
 /* #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;                                          \
@@ -99,13 +96,17 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags
                                   ,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: ");
@@ -197,12 +198,15 @@ PAM_EXTERN int pam_sm_setcred(pam_handle_t * pamh, int flags
        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;
 }
index cfa294f8201ba436e6c4b44d60c933a4151f63e8..e4998afd44fb02937042efda0c790d94ff4e56a1 100644 (file)
  * 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>
@@ -50,6 +44,7 @@
 #include <malloc.h>
 #include <unistd.h>
 #include <errno.h>
+#include <sys/types.h>
 #include <pwd.h>
 #include <syslog.h>
 #include <shadow.h>
@@ -57,7 +52,6 @@
 #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>
@@ -644,7 +638,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
                                int argc, const char **argv)
 {
        unsigned int ctrl, lctrl;
-       int retval;
+       int retval, i;
        int remember = -1;
 
        /* <DO NOT free() THESE> */
@@ -658,7 +652,22 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
        /* 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);
 
index ec658453c16adb7c574564be044ab1b9bf0e0ec1..e97bc1f0f937ba88b7fe270094086280c5f00bd1 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * $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>
index 610b29a725487d7a67dbc888280d4de3577ed3e7..256e49998f65fcfc400db3ac02d003aee4b35d63 100644 (file)
@@ -525,6 +525,8 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
                                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);
index 6868673805857d3407837f07d2a650b4ce3bc963..419f527307601136ab9e912cf373b393ee4b3868 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * $Id$
+ */
+
 #ifndef _PAM_UNIX_SUPPORT_H
 #define _PAM_UNIX_SUPPORT_H
 
index 66c0ad7fd734489918d1d8b5471864a840b45ad4..6e7d3b289b98a4dff5c60ce69d5407c0c885a8e3 100644 (file)
  *
  */
 
-#define _BSD_SOURCE
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
 
 #include <stdarg.h>
 #include <stdio.h>
index eeb364239548164f2d378f95ec4b5532e3419644..b1a60b4ce11ef25b6ecebf396b70dcbedb9397a0 100644 (file)
  * 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>
index 39226242f6038a97fdad8cc002894375536f69f7..8951fd917034cad6159520521fbf7a9bf8ee7b47 100644 (file)
@@ -6,76 +6,28 @@
 # $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
index 20ca5d100dc81557f6cba12a280d3635070bf1b2..7af5d3847461a4472d75ce09a7a10bb32497c721 100644 (file)
@@ -6,10 +6,8 @@
  * 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
index dcbf236d2b6333c21402c7f1c1b67f1cfc6fcaa0..44c56f17f67963bd0df8f0d80a1942accba5db53 100644 (file)
@@ -5,98 +5,11 @@
 # 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
index a262babfa31b3b0913e1f94db063112a0606554e..66945ff53e3966d100ee505a8d3fdffe2498e320 100644 (file)
@@ -1,86 +1,15 @@
 #
+# $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