summaryrefslogtreecommitdiff
path: root/modules/pam_filter
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2000-11-19 23:54:01 +0000
committerAndrew G. Morgan <morgan@kernel.org>2000-11-19 23:54:01 +0000
commit73346dba777b023e46830a973148eb0ddbf8f8b4 (patch)
tree3ac12799a597cb2004f8ebf5b18a4469ccee9a44 /modules/pam_filter
parent47575925596c2af2a78c009fcdd14de72fc82d3e (diff)
Relevant BUGIDs: task 15788, bugs 108297, 117476, 117474
Purpose of commit: autoconf support for Linux-PAM Commit summary: --------------- This is a merge of the autoconf support that was developed against a 0-72 branch. [Note, because CVS has some issues, this is actually only 95% of the actual commit. The other files were actually committed when the preparation branch Linux-PAM-0-73pre-autoconf was updated. Hopefully, this will complete the merge.]
Diffstat (limited to 'modules/pam_filter')
-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
4 files changed, 31 insertions, 88 deletions
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");
}