Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpam/modules Reverse sense of NO_STATIC_MODULES -> OPE...
details: https://anonhg.NetBSD.org/src/rev/a0ec82d7103b
branches: trunk
changeset: 1009628:a0ec82d7103b
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Apr 29 02:16:56 2020 +0000
description:
Reverse sense of NO_STATIC_MODULES -> OPENPAM_STATIC_MODULES.
This avoids leaking NO_STATIC_MODULES into the public header, which
has led to considerable confusion and workarounds in pkgrsc.
PR security/39313
PR security/55216
ok christos
diffstat:
external/bsd/openpam/dist/include/security/openpam.h | 5 ++---
lib/libpam/Makefile.inc | 6 +-----
lib/libpam/libpam/Makefile | 4 +++-
lib/libpam/modules/mod.mk | 3 ++-
4 files changed, 8 insertions(+), 10 deletions(-)
diffs (81 lines):
diff -r 0869e6000587 -r a0ec82d7103b external/bsd/openpam/dist/include/security/openpam.h
--- a/external/bsd/openpam/dist/include/security/openpam.h Wed Apr 29 01:56:54 2020 +0000
+++ b/external/bsd/openpam/dist/include/security/openpam.h Wed Apr 29 02:16:56 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: openpam.h,v 1.9 2017/05/06 19:50:09 christos Exp $ */
+/* $NetBSD: openpam.h,v 1.10 2020/04/29 02:16:56 riastradh Exp $ */
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
@@ -359,7 +359,7 @@
# define PAM_SOEXT ".so"
#endif
-#if (defined(__GNUC__) || defined(__PCC__)) && !defined(NO_STATIC_MODULES)
+#if (defined(__GNUC__) || defined(__PCC__)) && defined(OPENPAM_STATIC_MODULES)
# include <sys/cdefs.h>
# ifdef __FreeBSD__
# include <linker_set.h>
@@ -369,7 +369,6 @@
# define SET_DECLARE(a, b) __link_set_decl(a, b)
# define SET_FOREACH(a, b) __link_set_foreach(a, b)
# endif
-# define OPENPAM_STATIC_MODULES
# define PAM_EXTERN static
# define PAM_MODULE_ENTRY(name) \
static char _pam_name[] = name PAM_SOEXT; \
diff -r 0869e6000587 -r a0ec82d7103b lib/libpam/Makefile.inc
--- a/lib/libpam/Makefile.inc Wed Apr 29 01:56:54 2020 +0000
+++ b/lib/libpam/Makefile.inc Wed Apr 29 02:16:56 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.18 2017/05/06 19:52:25 christos Exp $
+# $NetBSD: Makefile.inc,v 1.19 2020/04/29 02:16:56 riastradh Exp $
# Copyright 1998 Juniper Networks, Inc.
# All rights reserved.
#
@@ -42,10 +42,6 @@
# No debugging
#CPPFLAGS+= -DDEBUG
-# ...and don't do either of those on the shared library.
-# XXX CSHLIBFLAGS isn't perfect, but it'll do for now.
-CSHLIBFLAGS+= -DNO_STATIC_MODULES
-
# Define the shared library version here. libpam and the modules share a
# version, and we need these variables early for module install rules.
SHLIB_MAJOR= 4
diff -r 0869e6000587 -r a0ec82d7103b lib/libpam/libpam/Makefile
--- a/lib/libpam/libpam/Makefile Wed Apr 29 01:56:54 2020 +0000
+++ b/lib/libpam/libpam/Makefile Wed Apr 29 02:16:56 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2020/03/03 00:46:06 christos Exp $
+# $NetBSD: Makefile,v 1.24 2020/04/29 02:16:56 riastradh Exp $
#-
# Copyright (c) 1998 Juniper Networks, Inc.
# All rights reserved.
@@ -206,6 +206,8 @@
${CC} ${LDFLAGS} -nostdlib -o ${.TARGET} -r -Wl,--whole-archive \
openpam_static.o ${STATIC_MODULE_LIBS}
+CPPFLAGS.openpam_static.c+= -DOPENPAM_STATIC_MODULES
+
CWARNFLAGS.clang+= -Wno-error=tautological-pointer-compare
COPTS.openpam_dynamic.c+= ${GCC_NO_CAST_FUNCTION_TYPE}
diff -r 0869e6000587 -r a0ec82d7103b lib/libpam/modules/mod.mk
--- a/lib/libpam/modules/mod.mk Wed Apr 29 01:56:54 2020 +0000
+++ b/lib/libpam/modules/mod.mk Wed Apr 29 02:16:56 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mod.mk,v 1.15 2020/02/27 02:56:46 christos Exp $
+# $NetBSD: mod.mk,v 1.16 2020/04/29 02:16:57 riastradh Exp $
NOLINT= # don't build a lint library
NOPROFILE= # don't build a profile library
@@ -21,6 +21,7 @@
libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR}
.else
libinstall::
+CPPFLAGS+= -DOPENPAM_STATIC_MODULES
.endif
.include <bsd.lib.mk>
Home |
Main Index |
Thread Index |
Old Index