svn commit: r226632 - head/lib/libpam/libpam

Dag-Erling Smorgrav des at FreeBSD.org
Sat Oct 22 14:08:22 UTC 2011


Author: des
Date: Sat Oct 22 14:08:21 2011
New Revision: 226632
URL: http://svn.freebsd.org/changeset/base/226632

Log:
  Revert the previous commit and add a comment explaining why it was wrong.

Modified:
  head/lib/libpam/libpam/Makefile

Modified: head/lib/libpam/libpam/Makefile
==============================================================================
--- head/lib/libpam/libpam/Makefile	Sat Oct 22 11:42:48 2011	(r226631)
+++ head/lib/libpam/libpam/Makefile	Sat Oct 22 14:08:21 2011	(r226632)
@@ -55,7 +55,6 @@ SRCS=	openpam_borrow_cred.c \
 	openpam_readline.c \
 	openpam_restore_cred.c \
 	openpam_set_option.c \
-	openpam_static.c \
 	openpam_ttyconv.c \
 	pam_acct_mgmt.c \
 	pam_authenticate.c \
@@ -149,16 +148,29 @@ HEADERS=	security/openpam.h \
 
 ADD_HEADERS=	security/pam_mod_misc.h
 
+#
 # Static modules
+#
+# We build static versions of all modules and of openpam_static.o,
+# then link them all together into openpam_static_modules.o.  None of
+# the modules export any symbols, but they store structures with
+# pointers to their service functions in a linker set which the code
+# in openpam_static.c traverses to locate the individual modules.
+#
 MODULE_DIR=	../modules
 .include "${.CURDIR}/${MODULE_DIR}/modules.inc"
 STATIC_MODULES=	${MODULES:C/.*/${MODULE_DIR}\/&\/lib&.a/}
 STATICOBJS+=	openpam_static_modules.o
-CLEANFILES+=	openpam_static_modules.o
+CLEANFILES+=	openpam_static.o \
+		openpam_static_modules.o
 
 openpam_static_modules.o: openpam_static.o ${STATIC_MODULES}
 	${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC}
 
+# We can't put openpam_static.c in SRCS, but we still want to scan it
+# for dependencies.
+DPSRCS=		openpam_static.c
+
 # Headers
 INCS=		${HEADERS} ${ADD_HEADERS}
 INCSDIR=	${INCLUDEDIR}/security


More information about the svn-src-all mailing list