summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/Makefile20
-rw-r--r--modules/README2
-rw-r--r--modules/dont_makefile4
-rw-r--r--modules/pam_access/Makefile103
-rw-r--r--modules/pam_access/pam_access.c11
-rw-r--r--modules/pam_cracklib/Makefile115
-rw-r--r--modules/pam_deny/Makefile122
-rw-r--r--modules/pam_env/Makefile109
-rw-r--r--modules/pam_env/pam_env.c4
-rw-r--r--modules/pam_filter/Makefile50
-rw-r--r--modules/pam_filter/pam_filter.c5
-rw-r--r--modules/pam_filter/upperLOWER/Makefile37
-rw-r--r--modules/pam_filter/upperLOWER/upperLOWER.c27
-rw-r--r--modules/pam_ftp/Makefile81
-rw-r--r--modules/pam_ftp/pam_ftp.c4
-rw-r--r--modules/pam_group/Makefile95
-rw-r--r--modules/pam_group/pam_group.c6
-rw-r--r--modules/pam_issue/Makefile83
-rw-r--r--modules/pam_lastlog/Makefile103
-rw-r--r--modules/pam_lastlog/pam_lastlog.c6
-rw-r--r--modules/pam_limits/Makefile97
-rw-r--r--modules/pam_limits/pam_limits.c11
-rw-r--r--modules/pam_listfile/Makefile81
-rw-r--r--modules/pam_listfile/pam_listfile.c10
-rw-r--r--modules/pam_mail/Makefile106
-rw-r--r--modules/pam_mail/pam_mail.c7
-rw-r--r--modules/pam_mkhomedir/Makefile81
-rw-r--r--modules/pam_motd/Makefile81
-rw-r--r--modules/pam_nologin/Makefile83
-rw-r--r--modules/pam_permit/Makefile123
-rw-r--r--modules/pam_pwdb/Makefile87
-rw-r--r--modules/pam_pwdb/pam_pwdb.c9
-rw-r--r--modules/pam_pwdb/pwdb_chkpwd.c7
-rw-r--r--modules/pam_radius/Makefile12
-rw-r--r--modules/pam_radius/pam_radius.h6
-rw-r--r--modules/pam_rhosts/Makefile107
-rw-r--r--modules/pam_rootok/Makefile110
-rw-r--r--modules/pam_securetty/Makefile80
-rw-r--r--modules/pam_shells/Makefile81
-rw-r--r--modules/pam_stress/Makefile108
-rw-r--r--modules/pam_stress/pam_stress.c8
-rw-r--r--modules/pam_tally/Makefile14
-rw-r--r--modules/pam_tally/pam_tally.c7
-rw-r--r--modules/pam_time/Makefile95
-rw-r--r--modules/pam_time/pam_time.c11
-rw-r--r--modules/pam_unix/Makefile45
-rw-r--r--modules/pam_unix/pam_unix_acct.c8
-rw-r--r--modules/pam_unix/pam_unix_auth.c5
-rw-r--r--modules/pam_unix/pam_unix_passwd.c10
-rw-r--r--modules/pam_unix/pam_unix_sess.c7
-rw-r--r--modules/pam_unix/support.h4
-rw-r--r--modules/pam_unix/unix_chkpwd.c6
-rw-r--r--modules/pam_unix/yppasswd_xdr.c5
-rw-r--r--modules/pam_userdb/Makefile76
-rw-r--r--modules/pam_userdb/pam_userdb.c16
-rw-r--r--modules/pam_warn/Makefile95
-rw-r--r--modules/pam_wheel/Makefile83
57 files changed, 309 insertions, 2460 deletions
diff --git a/modules/Makefile b/modules/Makefile
index 9b89ccfd..51964e5b 100644
--- a/modules/Makefile
+++ b/modules/Makefile
@@ -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
-
diff --git a/modules/README b/modules/README
index 86415947..73d3cf0c 100644
--- a/modules/README
+++ b/modules/README
@@ -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
diff --git a/modules/dont_makefile b/modules/dont_makefile
index f256ce1b..b7e11834 100644
--- a/modules/dont_makefile
+++ b/modules/dont_makefile
@@ -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
diff --git a/modules/pam_access/Makefile b/modules/pam_access/Makefile
index 3d3611c4..d93c9f40 100644
--- a/modules/pam_access/Makefile
+++ b/modules/pam_access/Makefile
@@ -5,102 +5,17 @@
# 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
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index 12133392..b8722646 100644
--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -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);
diff --git a/modules/pam_cracklib/Makefile b/modules/pam_cracklib/Makefile
index 554362d4..c279857c 100644
--- a/modules/pam_cracklib/Makefile
+++ b/modules/pam_cracklib/Makefile
@@ -1,118 +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
-#
-
-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
diff --git a/modules/pam_deny/Makefile b/modules/pam_deny/Makefile
index e6fa2e60..7dd7b4fd 100644
--- a/modules/pam_deny/Makefile
+++ b/modules/pam_deny/Makefile
@@ -5,127 +5,11 @@
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1 2000/06/20 22:11:33 agmorgan
-# Initial revision
+# 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
diff --git a/modules/pam_env/Makefile b/modules/pam_env/Makefile
index e872d1ee..fa711ce3 100644
--- a/modules/pam_env/Makefile
+++ b/modules/pam_env/Makefile
@@ -5,107 +5,18 @@
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1 2000/06/20 22:11:33 agmorgan
-# Initial revision
-#
-# 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
diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c
index 5ba89268..f140f3cb 100644
--- a/modules/pam_env/pam_env.c
+++ b/modules/pam_env/pam_env.c
@@ -15,10 +15,8 @@
#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>
diff --git a/modules/pam_filter/Makefile b/modules/pam_filter/Makefile
index f4db56a9..97181663 100644
--- a/modules/pam_filter/Makefile
+++ b/modules/pam_filter/Makefile
@@ -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
diff --git a/modules/pam_filter/pam_filter.c b/modules/pam_filter/pam_filter.c
index a1ba10b0..f67ec0d2 100644
--- a/modules/pam_filter/pam_filter.c
+++ b/modules/pam_filter/pam_filter.c
@@ -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>
diff --git a/modules/pam_filter/upperLOWER/Makefile b/modules/pam_filter/upperLOWER/Makefile
index a75b06bb..6db8d6e3 100644
--- a/modules/pam_filter/upperLOWER/Makefile
+++ b/modules/pam_filter/upperLOWER/Makefile
@@ -1,50 +1,28 @@
#
# $Id$
#
-# $Log$
-# Revision 1.1 2000/06/20 22:11:37 agmorgan
-# Initial revision
-#
-# 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 $<
diff --git a/modules/pam_filter/upperLOWER/upperLOWER.c b/modules/pam_filter/upperLOWER/upperLOWER.c
index 3f7d26cd..c85a950a 100644
--- a/modules/pam_filter/upperLOWER/upperLOWER.c
+++ b/modules/pam_filter/upperLOWER/upperLOWER.c
@@ -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 2000/06/20 22:11:37 agmorgan
- * Initial revision
- *
- * 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");
}
diff --git a/modules/pam_ftp/Makefile b/modules/pam_ftp/Makefile
index 0ce77a7a..fb61ac16 100644
--- a/modules/pam_ftp/Makefile
+++ b/modules/pam_ftp/Makefile
@@ -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
diff --git a/modules/pam_ftp/pam_ftp.c b/modules/pam_ftp/pam_ftp.c
index eb2c3fd9..bebcd2b2 100644
--- a/modules/pam_ftp/pam_ftp.c
+++ b/modules/pam_ftp/pam_ftp.c
@@ -14,10 +14,8 @@
/* 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>
diff --git a/modules/pam_group/Makefile b/modules/pam_group/Makefile
index b61a57de..cb3c4c89 100644
--- a/modules/pam_group/Makefile
+++ b/modules/pam_group/Makefile
@@ -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
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c
index 81953f76..2b820df2 100644
--- a/modules/pam_group/pam_group.c
+++ b/modules/pam_group/pam_group.c
@@ -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 */
diff --git a/modules/pam_issue/Makefile b/modules/pam_issue/Makefile
index 6770ef36..d73710e1 100644
--- a/modules/pam_issue/Makefile
+++ b/modules/pam_issue/Makefile
@@ -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
diff --git a/modules/pam_lastlog/Makefile b/modules/pam_lastlog/Makefile
index b5a6f212..31035a99 100644
--- a/modules/pam_lastlog/Makefile
+++ b/modules/pam_lastlog/Makefile
@@ -5,108 +5,11 @@
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1 2000/06/20 22:11:40 agmorgan
-# Initial revision
-#
-# 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
diff --git a/modules/pam_lastlog/pam_lastlog.c b/modules/pam_lastlog/pam_lastlog.c
index 7207976e..05c3c083 100644
--- a/modules/pam_lastlog/pam_lastlog.c
+++ b/modules/pam_lastlog/pam_lastlog.c
@@ -10,10 +10,7 @@
* 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>
diff --git a/modules/pam_limits/Makefile b/modules/pam_limits/Makefile
index fe684863..9473d915 100644
--- a/modules/pam_limits/Makefile
+++ b/modules/pam_limits/Makefile
@@ -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
diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c
index e832dc63..8ecb5682 100644
--- a/modules/pam_limits/pam_limits.c
+++ b/modules/pam_limits/pam_limits.c
@@ -17,10 +17,7 @@
#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 */
diff --git a/modules/pam_listfile/Makefile b/modules/pam_listfile/Makefile
index 02940390..18315256 100644
--- a/modules/pam_listfile/Makefile
+++ b/modules/pam_listfile/Makefile
@@ -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
diff --git a/modules/pam_listfile/pam_listfile.c b/modules/pam_listfile/pam_listfile.c
index 8b1b45f0..5a8c83e0 100644
--- a/modules/pam_listfile/pam_listfile.c
+++ b/modules/pam_listfile/pam_listfile.c
@@ -10,15 +10,7 @@
* 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>
diff --git a/modules/pam_mail/Makefile b/modules/pam_mail/Makefile
index 64f73b0b..93ca429b 100644
--- a/modules/pam_mail/Makefile
+++ b/modules/pam_mail/Makefile
@@ -5,109 +5,11 @@
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1 2000/06/20 22:11:45 agmorgan
-# Initial revision
+# 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
diff --git a/modules/pam_mail/pam_mail.c b/modules/pam_mail/pam_mail.c
index f67b6f02..4f1152b3 100644
--- a/modules/pam_mail/pam_mail.c
+++ b/modules/pam_mail/pam_mail.c
@@ -16,12 +16,7 @@
#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>
diff --git a/modules/pam_mkhomedir/Makefile b/modules/pam_mkhomedir/Makefile
index fa79b489..d518c26f 100644
--- a/modules/pam_mkhomedir/Makefile
+++ b/modules/pam_mkhomedir/Makefile
@@ -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)
-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
diff --git a/modules/pam_motd/Makefile b/modules/pam_motd/Makefile
index ef9f3113..ae4acb8c 100644
--- a/modules/pam_motd/Makefile
+++ b/modules/pam_motd/Makefile
@@ -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
diff --git a/modules/pam_nologin/Makefile b/modules/pam_nologin/Makefile
index 03d779bf..130787e7 100644
--- a/modules/pam_nologin/Makefile
+++ b/modules/pam_nologin/Makefile
@@ -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
diff --git a/modules/pam_permit/Makefile b/modules/pam_permit/Makefile
index c291599e..b4cc3b5b 100644
--- a/modules/pam_permit/Makefile
+++ b/modules/pam_permit/Makefile
@@ -5,128 +5,11 @@
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1 2000/06/20 22:11:46 agmorgan
-# Initial revision
+# 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
diff --git a/modules/pam_pwdb/Makefile b/modules/pam_pwdb/Makefile
index fcb7aec4..2b581dcd 100644
--- a/modules/pam_pwdb/Makefile
+++ b/modules/pam_pwdb/Makefile
@@ -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 2000/06/20 22:11:47 agmorgan
-# Initial revision
-#
-# 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
-#
-#
diff --git a/modules/pam_pwdb/pam_pwdb.c b/modules/pam_pwdb/pam_pwdb.c
index 4d335572..d736c6a8 100644
--- a/modules/pam_pwdb/pam_pwdb.c
+++ b/modules/pam_pwdb/pam_pwdb.c
@@ -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>
diff --git a/modules/pam_pwdb/pwdb_chkpwd.c b/modules/pam_pwdb/pwdb_chkpwd.c
index 2c7ba29c..fdd3cfa3 100644
--- a/modules/pam_pwdb/pwdb_chkpwd.c
+++ b/modules/pam_pwdb/pwdb_chkpwd.c
@@ -13,12 +13,7 @@
*
*/
-#define _BSD_SOURCE
-
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdarg.h>
#include <stdio.h>
diff --git a/modules/pam_radius/Makefile b/modules/pam_radius/Makefile
index a74b911f..aa149d3e 100644
--- a/modules/pam_radius/Makefile
+++ b/modules/pam_radius/Makefile
@@ -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 $<
diff --git a/modules/pam_radius/pam_radius.h b/modules/pam_radius/pam_radius.h
index 1f860eb5..8cee7ff1 100644
--- a/modules/pam_radius/pam_radius.h
+++ b/modules/pam_radius/pam_radius.h
@@ -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>
diff --git a/modules/pam_rhosts/Makefile b/modules/pam_rhosts/Makefile
index 431842b2..46d75d6a 100644
--- a/modules/pam_rhosts/Makefile
+++ b/modules/pam_rhosts/Makefile
@@ -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
diff --git a/modules/pam_rootok/Makefile b/modules/pam_rootok/Makefile
index f3f2e53d..3460c2a2 100644
--- a/modules/pam_rootok/Makefile
+++ b/modules/pam_rootok/Makefile
@@ -5,113 +5,11 @@
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1 2000/06/20 22:11:56 agmorgan
-# Initial revision
+# 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
diff --git a/modules/pam_securetty/Makefile b/modules/pam_securetty/Makefile
index d8a09ea1..9b80d2e9 100644
--- a/modules/pam_securetty/Makefile
+++ b/modules/pam_securetty/Makefile
@@ -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
diff --git a/modules/pam_shells/Makefile b/modules/pam_shells/Makefile
index 121b19a0..b057dc00 100644
--- a/modules/pam_shells/Makefile
+++ b/modules/pam_shells/Makefile
@@ -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
diff --git a/modules/pam_stress/Makefile b/modules/pam_stress/Makefile
index 1bcfa502..598809a5 100644
--- a/modules/pam_stress/Makefile
+++ b/modules/pam_stress/Makefile
@@ -1,115 +1,15 @@
#
# $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 2000/06/20 22:11:57 agmorgan
-# Initial revision
-#
-# 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
diff --git a/modules/pam_stress/pam_stress.c b/modules/pam_stress/pam_stress.c
index e5813579..f5126fd2 100644
--- a/modules/pam_stress/pam_stress.c
+++ b/modules/pam_stress/pam_stress.c
@@ -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>
diff --git a/modules/pam_tally/Makefile b/modules/pam_tally/Makefile
index 78ce621d..7949b558 100644
--- a/modules/pam_tally/Makefile
+++ b/modules/pam_tally/Makefile
@@ -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 $<
diff --git a/modules/pam_tally/pam_tally.c b/modules/pam_tally/pam_tally.c
index ff75697d..436ce956 100644
--- a/modules/pam_tally/pam_tally.c
+++ b/modules/pam_tally/pam_tally.c
@@ -11,10 +11,7 @@
* 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 */
/*---------------------------------------------------------------------*/
diff --git a/modules/pam_time/Makefile b/modules/pam_time/Makefile
index 03105bb1..9c2d0eb3 100644
--- a/modules/pam_time/Makefile
+++ b/modules/pam_time/Makefile
@@ -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
diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c
index 2ca51859..b3ce0df9 100644
--- a/modules/pam_time/pam_time.c
+++ b/modules/pam_time/pam_time.c
@@ -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 */
diff --git a/modules/pam_unix/Makefile b/modules/pam_unix/Makefile
index 89b33cfd..dc0b6ac2 100644
--- a/modules/pam_unix/Makefile
+++ b/modules/pam_unix/Makefile
@@ -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) $<
diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c
index f86f56e5..8aeb43f3 100644
--- a/modules/pam_unix/pam_unix_acct.c
+++ b/modules/pam_unix/pam_unix_acct.c
@@ -34,12 +34,7 @@
* 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 */
diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c
index 7c639d88..bec9d99f 100644
--- a/modules/pam_unix/pam_unix_auth.c
+++ b/modules/pam_unix/pam_unix_auth.c
@@ -37,10 +37,7 @@
/* #define DEBUG */
-#ifdef linux
-#define _GNU_SOURCE
-#include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
index a3925895..e4998afd 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -35,13 +35,7 @@
* 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>
diff --git a/modules/pam_unix/pam_unix_sess.c b/modules/pam_unix/pam_unix_sess.c
index ec658453..e97bc1f0 100644
--- a/modules/pam_unix/pam_unix_sess.c
+++ b/modules/pam_unix/pam_unix_sess.c
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* Copyright Alexander O. Yuriev, 1996. All rights reserved.
* Copyright Jan Rêkorajski, 1999. All rights reserved.
*
@@ -34,10 +36,7 @@
* 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>
diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h
index 68686738..419f5273 100644
--- a/modules/pam_unix/support.h
+++ b/modules/pam_unix/support.h
@@ -1,3 +1,7 @@
+/*
+ * $Id$
+ */
+
#ifndef _PAM_UNIX_SUPPORT_H
#define _PAM_UNIX_SUPPORT_H
diff --git a/modules/pam_unix/unix_chkpwd.c b/modules/pam_unix/unix_chkpwd.c
index 66c0ad7f..6e7d3b28 100644
--- a/modules/pam_unix/unix_chkpwd.c
+++ b/modules/pam_unix/unix_chkpwd.c
@@ -13,11 +13,7 @@
*
*/
-#define _BSD_SOURCE
-#ifdef linux
-# define _GNU_SOURCE
-# include <features.h>
-#endif
+#include <security/_pam_aconf.h>
#include <stdarg.h>
#include <stdio.h>
diff --git a/modules/pam_unix/yppasswd_xdr.c b/modules/pam_unix/yppasswd_xdr.c
index eeb36423..b1a60b4c 100644
--- a/modules/pam_unix/yppasswd_xdr.c
+++ b/modules/pam_unix/yppasswd_xdr.c
@@ -10,10 +10,7 @@
* 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>
diff --git a/modules/pam_userdb/Makefile b/modules/pam_userdb/Makefile
index 39226242..8951fd91 100644
--- a/modules/pam_userdb/Makefile
+++ b/modules/pam_userdb/Makefile
@@ -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
diff --git a/modules/pam_userdb/pam_userdb.c b/modules/pam_userdb/pam_userdb.c
index 20ca5d10..7af5d384 100644
--- a/modules/pam_userdb/pam_userdb.c
+++ b/modules/pam_userdb/pam_userdb.c
@@ -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>
@@ -22,12 +20,16 @@
#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
diff --git a/modules/pam_warn/Makefile b/modules/pam_warn/Makefile
index 7b48689c..44c56f17 100644
--- a/modules/pam_warn/Makefile
+++ b/modules/pam_warn/Makefile
@@ -5,98 +5,11 @@
# Linux-PAM. You should not modify this Makefile (unless you know
# what you are doing!).
#
-# $Log$
-# Revision 1.1 2000/06/20 22:12:10 agmorgan
-# Initial revision
+# 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
diff --git a/modules/pam_wheel/Makefile b/modules/pam_wheel/Makefile
index a262babf..66945ff5 100644
--- a/modules/pam_wheel/Makefile
+++ b/modules/pam_wheel/Makefile
@@ -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