summaryrefslogtreecommitdiff
path: root/modules/pam_unix
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_unix
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_unix')
-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
8 files changed, 41 insertions, 49 deletions
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>