libpam: Reorganize libpam build structure.
authorzrj <rimvydas.jasinskas@gmail.com>
Thu, 9 Nov 2017 13:01:57 +0000 (15:01 +0200)
committerzrj <zrj@dragonflybsd.org>
Fri, 10 Nov 2017 17:43:38 +0000 (19:43 +0200)
In preparations for hooking back the openpam_static.c

No functional change except for debug info (paths have changed).

79 files changed:
Makefile.inc1
lib/Makefile
lib/libpam/Makefile
lib/libpam/Makefile.inc [new file with mode: 0644]
lib/libpam/libpam/Makefile [copied from lib/libpam/Makefile with 95% similarity]
lib/libpam/libpam/config.h [moved from lib/libpam/config.h with 100% similarity]
lib/libpam/libpam/pam_debug_log.c [moved from lib/libpam/pam_debug_log.c with 100% similarity]
lib/libpam/libpam/security/pam_mod_misc.h [moved from lib/libpam/pam_mod_misc.h with 100% similarity]
lib/libpam/modules/Makefile [moved from lib/pam_module/Makefile with 83% similarity]
lib/libpam/modules/Makefile.inc [moved from lib/pam_module/Makefile.inc with 88% similarity]
lib/libpam/modules/pam_chroot/Makefile [moved from lib/pam_module/pam_chroot/Makefile with 100% similarity]
lib/libpam/modules/pam_chroot/pam_chroot.8 [moved from lib/pam_module/pam_chroot/pam_chroot.8 with 100% similarity]
lib/libpam/modules/pam_chroot/pam_chroot.c [moved from lib/pam_module/pam_chroot/pam_chroot.c with 100% similarity]
lib/libpam/modules/pam_deny/Makefile [new file with mode: 0644]
lib/libpam/modules/pam_deny/pam_deny.8 [moved from lib/pam_module/pam_deny/pam_deny.8 with 100% similarity]
lib/libpam/modules/pam_deny/pam_deny.c [moved from lib/pam_module/pam_deny/pam_deny.c with 100% similarity]
lib/libpam/modules/pam_echo/Makefile [moved from lib/pam_module/pam_echo/Makefile with 100% similarity]
lib/libpam/modules/pam_echo/pam_echo.8 [moved from lib/pam_module/pam_echo/pam_echo.8 with 100% similarity]
lib/libpam/modules/pam_echo/pam_echo.c [moved from lib/pam_module/pam_echo/pam_echo.c with 100% similarity]
lib/libpam/modules/pam_exec/Makefile [moved from lib/pam_module/pam_exec/Makefile with 100% similarity]
lib/libpam/modules/pam_exec/pam_exec.8 [moved from lib/pam_module/pam_exec/pam_exec.8 with 100% similarity]
lib/libpam/modules/pam_exec/pam_exec.c [moved from lib/pam_module/pam_exec/pam_exec.c with 100% similarity]
lib/libpam/modules/pam_ftpusers/Makefile [moved from lib/pam_module/pam_ftpusers/Makefile with 100% similarity]
lib/libpam/modules/pam_ftpusers/pam_ftpusers.8 [moved from lib/pam_module/pam_ftpusers/pam_ftpusers.8 with 100% similarity]
lib/libpam/modules/pam_ftpusers/pam_ftpusers.c [moved from lib/pam_module/pam_ftpusers/pam_ftpusers.c with 100% similarity]
lib/libpam/modules/pam_group/Makefile [moved from lib/pam_module/pam_group/Makefile with 100% similarity]
lib/libpam/modules/pam_group/pam_group.8 [moved from lib/pam_module/pam_group/pam_group.8 with 100% similarity]
lib/libpam/modules/pam_group/pam_group.c [moved from lib/pam_module/pam_group/pam_group.c with 100% similarity]
lib/libpam/modules/pam_guest/Makefile [moved from lib/pam_module/pam_guest/Makefile with 100% similarity]
lib/libpam/modules/pam_guest/pam_guest.8 [moved from lib/pam_module/pam_guest/pam_guest.8 with 100% similarity]
lib/libpam/modules/pam_guest/pam_guest.c [moved from lib/pam_module/pam_guest/pam_guest.c with 100% similarity]
lib/libpam/modules/pam_lastlog/Makefile [moved from lib/pam_module/pam_lastlog/Makefile with 100% similarity]
lib/libpam/modules/pam_lastlog/pam_lastlog.8 [moved from lib/pam_module/pam_lastlog/pam_lastlog.8 with 100% similarity]
lib/libpam/modules/pam_lastlog/pam_lastlog.c [moved from lib/pam_module/pam_lastlog/pam_lastlog.c with 99% similarity]
lib/libpam/modules/pam_login_access/Makefile [moved from lib/pam_module/pam_login_access/Makefile with 100% similarity]
lib/libpam/modules/pam_login_access/login.access.5 [moved from lib/pam_module/pam_login_access/login.access.5 with 100% similarity]
lib/libpam/modules/pam_login_access/login_access.c [moved from lib/pam_module/pam_login_access/login_access.c with 100% similarity]
lib/libpam/modules/pam_login_access/pam_login_access.8 [moved from lib/pam_module/pam_login_access/pam_login_access.8 with 100% similarity]
lib/libpam/modules/pam_login_access/pam_login_access.c [moved from lib/pam_module/pam_login_access/pam_login_access.c with 100% similarity]
lib/libpam/modules/pam_login_access/pam_login_access.h [moved from lib/pam_module/pam_login_access/pam_login_access.h with 100% similarity]
lib/libpam/modules/pam_nologin/Makefile [moved from lib/pam_module/pam_nologin/Makefile with 100% similarity]
lib/libpam/modules/pam_nologin/pam_nologin.8 [moved from lib/pam_module/pam_nologin/pam_nologin.8 with 100% similarity]
lib/libpam/modules/pam_nologin/pam_nologin.c [moved from lib/pam_module/pam_nologin/pam_nologin.c with 100% similarity]
lib/libpam/modules/pam_opie/Makefile [moved from lib/pam_module/pam_opie/Makefile with 53% similarity]
lib/libpam/modules/pam_opie/pam_opie.8 [moved from lib/pam_module/pam_opie/pam_opie.8 with 100% similarity]
lib/libpam/modules/pam_opie/pam_opie.c [moved from lib/pam_module/pam_opie/pam_opie.c with 100% similarity]
lib/libpam/modules/pam_opieaccess/Makefile [moved from lib/pam_module/pam_opieaccess/Makefile with 56% similarity]
lib/libpam/modules/pam_opieaccess/pam_opieaccess.8 [moved from lib/pam_module/pam_opieaccess/pam_opieaccess.8 with 100% similarity]
lib/libpam/modules/pam_opieaccess/pam_opieaccess.c [moved from lib/pam_module/pam_opieaccess/pam_opieaccess.c with 100% similarity]
lib/libpam/modules/pam_passwdqc/Makefile [moved from lib/pam_module/pam_passwdqc/Makefile with 79% similarity]
lib/libpam/modules/pam_permit/Makefile [new file with mode: 0644]
lib/libpam/modules/pam_permit/pam_permit.8 [moved from lib/pam_module/pam_permit/pam_permit.8 with 100% similarity]
lib/libpam/modules/pam_permit/pam_permit.c [moved from lib/pam_module/pam_permit/pam_permit.c with 100% similarity]
lib/libpam/modules/pam_radius/Makefile [moved from lib/pam_module/pam_radius/Makefile with 55% similarity]
lib/libpam/modules/pam_radius/pam_radius.8 [moved from lib/pam_module/pam_radius/pam_radius.8 with 100% similarity]
lib/libpam/modules/pam_radius/pam_radius.c [moved from lib/pam_module/pam_radius/pam_radius.c with 100% similarity]
lib/libpam/modules/pam_rhosts/Makefile [moved from lib/pam_module/pam_rhosts/Makefile with 100% similarity]
lib/libpam/modules/pam_rhosts/pam_rhosts.8 [moved from lib/pam_module/pam_rhosts/pam_rhosts.8 with 100% similarity]
lib/libpam/modules/pam_rhosts/pam_rhosts.c [moved from lib/pam_module/pam_rhosts/pam_rhosts.c with 100% similarity]
lib/libpam/modules/pam_rootok/Makefile [moved from lib/pam_module/pam_rootok/Makefile with 100% similarity]
lib/libpam/modules/pam_rootok/pam_rootok.8 [moved from lib/pam_module/pam_rootok/pam_rootok.8 with 100% similarity]
lib/libpam/modules/pam_rootok/pam_rootok.c [moved from lib/pam_module/pam_rootok/pam_rootok.c with 100% similarity]
lib/libpam/modules/pam_securetty/Makefile [moved from lib/pam_module/pam_securetty/Makefile with 100% similarity]
lib/libpam/modules/pam_securetty/pam_securetty.8 [moved from lib/pam_module/pam_securetty/pam_securetty.8 with 100% similarity]
lib/libpam/modules/pam_securetty/pam_securetty.c [moved from lib/pam_module/pam_securetty/pam_securetty.c with 100% similarity]
lib/libpam/modules/pam_self/Makefile [moved from lib/pam_module/pam_self/Makefile with 100% similarity]
lib/libpam/modules/pam_self/pam_self.8 [moved from lib/pam_module/pam_self/pam_self.8 with 100% similarity]
lib/libpam/modules/pam_self/pam_self.c [moved from lib/pam_module/pam_self/pam_self.c with 100% similarity]
lib/libpam/modules/pam_ssh/Makefile [moved from lib/pam_module/pam_ssh/Makefile with 67% similarity]
lib/libpam/modules/pam_ssh/pam_ssh.8 [moved from lib/pam_module/pam_ssh/pam_ssh.8 with 100% similarity]
lib/libpam/modules/pam_ssh/pam_ssh.c [moved from lib/pam_module/pam_ssh/pam_ssh.c with 100% similarity]
lib/libpam/modules/pam_tacplus/Makefile [moved from lib/pam_module/pam_tacplus/Makefile with 56% similarity]
lib/libpam/modules/pam_tacplus/pam_tacplus.8 [moved from lib/pam_module/pam_tacplus/pam_tacplus.8 with 100% similarity]
lib/libpam/modules/pam_tacplus/pam_tacplus.c [moved from lib/pam_module/pam_tacplus/pam_tacplus.c with 100% similarity]
lib/libpam/modules/pam_unix/Makefile [moved from lib/pam_module/pam_unix/Makefile with 69% similarity]
lib/libpam/modules/pam_unix/pam_unix.8 [moved from lib/pam_module/pam_unix/pam_unix.8 with 100% similarity]
lib/libpam/modules/pam_unix/pam_unix.c [moved from lib/pam_module/pam_unix/pam_unix.c with 100% similarity]
lib/pam_module/pam_deny/Makefile [deleted file]
lib/pam_module/pam_permit/Makefile [deleted file]

index 985ea10..7cb1fa3 100644 (file)
@@ -1072,7 +1072,7 @@ lib/libopie__L: lib/librecrypto__L
 _prebuild_libs+= lib/libopie
 
 _prebuild_libs+= lib/libradius lib/libsbuf lib/libtacplus lib/libm \
-               lib/libpam lib/libypclnt lib/lib${THREAD_LIB} \
+               lib/libpam/libpam lib/libypclnt lib/lib${THREAD_LIB} \
                lib/libpthread lib/liblzma lib/libprop lib/libdevattr
 
 _generic_libs+=        usr.bin/flex/lib
index 6cd425d..a69faab 100644 (file)
@@ -9,7 +9,6 @@
 #    libthread_xu|libc_r must be built before libpthread.
 #    libpthread must be built before liblmza, libprop.
 #    libprop must be built before libdevattr
-#    libpam must be built before pam_module
 #
 # libmd must be built before libfetch, libarchive.
 # libcrypt must be built before libfetch, libarchive, and libradius.
@@ -101,8 +100,7 @@ SUBDIR=     ${SUBDIR_ORDERED} \
        libvgl \
        libwrap \
        liby \
-       libypclnt \
-       pam_module
+       libypclnt
 
 .if make(install)
 SUBDIR:=       libc ${SUBDIR:Nlibc}
index 92243a3..e804a1f 100644 (file)
@@ -1,134 +1,6 @@
-LIB=   pam
+# libpam is normally built earlier by the _prebuild_libs target.
 
-SRCDIR=        ${.CURDIR}/../../contrib/openpam
+SUBDIR+=       libpam modules
+SUBDIR_ORDERED=
 
-MODULE_DIR=    ${LIBDIR}/security
-
-CFLAGS+= -DHAVE_CONFIG_H
-CFLAGS+= -DOPENPAM_MODULES_DIR='"${MODULE_DIR}/"'
-CFLAGS+= -I${SRCDIR}/lib -I${SRCDIR}/include -I${.CURDIR}
-
-WARNS= 3
-
-# Dist files
-SRCS=  \
-       openpam_borrow_cred.c \
-       openpam_check_owner_perms.c \
-       openpam_configure.c \
-       openpam_constants.c \
-       openpam_dispatch.c \
-       openpam_dynamic.c \
-       openpam_features.c \
-       openpam_findenv.c \
-       openpam_free_data.c \
-       openpam_free_envlist.c \
-       openpam_get_feature.c \
-       openpam_get_option.c \
-       openpam_load.c \
-       openpam_log.c \
-       openpam_nullconv.c \
-       openpam_readline.c \
-       openpam_readlinev.c \
-       openpam_readword.c \
-       openpam_restore_cred.c \
-       openpam_set_feature.c \
-       openpam_set_option.c \
-       openpam_straddch.c \
-       openpam_subst.c \
-       openpam_ttyconv.c \
-       pam_acct_mgmt.c \
-       pam_authenticate.c \
-       pam_chauthtok.c \
-       pam_close_session.c \
-       pam_end.c \
-       pam_error.c \
-       pam_get_authtok.c \
-       pam_get_data.c \
-       pam_get_item.c \
-       pam_get_user.c \
-       pam_getenv.c \
-       pam_getenvlist.c \
-       pam_info.c \
-       pam_open_session.c \
-       pam_prompt.c \
-       pam_putenv.c \
-       pam_set_data.c \
-       pam_set_item.c \
-       pam_setcred.c \
-       pam_setenv.c \
-       pam_start.c \
-       pam_strerror.c \
-       pam_verror.c \
-       pam_vinfo.c \
-       pam_vprompt.c
-# Local files
-SRCS+= pam_debug_log.c
-
-# only when OPENPAM_STATIC_MODULES
-#SRCS+=        openpam_static.c
-
-PAMINCS=openpam.h \
-       openpam_attr.h \
-       openpam_version.h \
-       pam_appl.h \
-       pam_constants.h \
-       pam_modules.h \
-       pam_types.h
-INCS=  ${PAMINCS:S;^;${SRCDIR}/include/security/;} pam_mod_misc.h
-INCSDIR=       ${INCLUDEDIR}/security
-
-MAN=   openpam.3 \
-       openpam_borrow_cred.3 \
-       openpam_free_data.3 \
-       openpam_free_envlist.3 \
-       openpam_get_feature.3 \
-       openpam_get_option.3 \
-       openpam_log.3 \
-       openpam_nullconv.3 \
-       openpam_readline.3 \
-       openpam_readlinev.3 \
-       openpam_readword.3 \
-       openpam_restore_cred.3 \
-       openpam_set_feature.3 \
-       openpam_set_option.3 \
-       openpam_straddch.3 \
-       openpam_subst.3 \
-       openpam_ttyconv.3 \
-       pam.3 \
-       pam_acct_mgmt.3 \
-       pam_authenticate.3 \
-       pam_chauthtok.3 \
-       pam_close_session.3 \
-       pam_conv.3 \
-       pam_end.3 \
-       pam_error.3 \
-       pam_get_authtok.3 \
-       pam_get_data.3 \
-       pam_get_item.3 \
-       pam_get_user.3 \
-       pam_getenv.3 \
-       pam_getenvlist.3 \
-       pam_info.3 \
-       pam_open_session.3 \
-       pam_prompt.3 \
-       pam_putenv.3 \
-       pam_set_data.3 \
-       pam_set_item.3 \
-       pam_setcred.3 \
-       pam_setenv.3 \
-       pam_sm_acct_mgmt.3 \
-       pam_sm_authenticate.3 \
-       pam_sm_chauthtok.3 \
-       pam_sm_close_session.3 \
-       pam_sm_open_session.3 \
-       pam_sm_setcred.3 \
-       pam_start.3 \
-       pam_strerror.3 \
-       pam_verror.3 \
-       pam_vinfo.3 \
-       pam_vprompt.3 \
-       pam.conf.5
-
-.PATH: ${SRCDIR}/lib ${SRCDIR}/doc/man
-
-.include <bsd.lib.mk>
+.include <bsd.subdir.mk>
diff --git a/lib/libpam/Makefile.inc b/lib/libpam/Makefile.inc
new file mode 100644 (file)
index 0000000..d3b5cbd
--- /dev/null
@@ -0,0 +1,2 @@
+
+.include "../Makefile.inc"
similarity index 95%
copy from lib/libpam/Makefile
copy to lib/libpam/libpam/Makefile
index 92243a3..d44ebe3 100644 (file)
@@ -1,6 +1,6 @@
 LIB=   pam
 
-SRCDIR=        ${.CURDIR}/../../contrib/openpam
+SRCDIR=        ${.CURDIR}/../../../contrib/openpam
 
 MODULE_DIR=    ${LIBDIR}/security
 
@@ -74,7 +74,7 @@ PAMINCS=openpam.h \
        pam_constants.h \
        pam_modules.h \
        pam_types.h
-INCS=  ${PAMINCS:S;^;${SRCDIR}/include/security/;} pam_mod_misc.h
+INCS=  ${PAMINCS:S;^;${SRCDIR}/include/security/;} security/pam_mod_misc.h
 INCSDIR=       ${INCLUDEDIR}/security
 
 MAN=   openpam.3 \
similarity index 83%
rename from lib/pam_module/Makefile
rename to lib/libpam/modules/Makefile
index 8f101b7..64fa681 100644 (file)
@@ -1,4 +1,3 @@
-# $DragonFly: src/lib/pam_module/Makefile,v 1.4 2008/01/02 17:41:30 matthias Exp $
 
 SUBDIR=        pam_chroot \
        pam_deny \
similarity index 88%
rename from lib/pam_module/Makefile.inc
rename to lib/libpam/modules/Makefile.inc
index 43b4bf4..0bf45d2 100644 (file)
@@ -12,6 +12,6 @@ CFLAGS+=      -I${LIBPAMDIR}
 LDADD+=        -lpam
 DPADD+=        ${LIBPAM}
 
-OPENPAM_DIR=   ${.CURDIR}/../../../contrib/openpam
+OPENPAM_DIR=   ${.CURDIR}/../../../../contrib/openpam
 
 .include "../Makefile.inc"
diff --git a/lib/libpam/modules/pam_deny/Makefile b/lib/libpam/modules/pam_deny/Makefile
new file mode 100644 (file)
index 0000000..6de3b39
--- /dev/null
@@ -0,0 +1,6 @@
+
+LIB=   pam_deny
+SRCS=  pam_deny.c
+MAN=   pam_deny.8
+
+.include <bsd.lib.mk>
similarity index 99%
rename from lib/pam_module/pam_lastlog/pam_lastlog.c
rename to lib/libpam/modules/pam_lastlog/pam_lastlog.c
index 5088fee..7da868c 100644 (file)
@@ -359,4 +359,3 @@ dolastlog(pam_handle_t *pamh, int quiet, const struct passwd *pwd,
 #endif
 
 PAM_MODULE_ENTRY("pam_lastlog");
-
similarity index 53%
rename from lib/pam_module/pam_opie/Makefile
rename to lib/libpam/modules/pam_opie/Makefile
index de8b8d4..f69526a 100644 (file)
@@ -1,4 +1,3 @@
-# $DragonFly: src/lib/pam_module/pam_opie/Makefile,v 1.2 2005/07/28 19:25:41 joerg Exp $
 
 LIB=   pam_opie
 SRCS=  pam_opie.c
similarity index 56%
rename from lib/pam_module/pam_opieaccess/Makefile
rename to lib/libpam/modules/pam_opieaccess/Makefile
index 859e064..036191e 100644 (file)
@@ -1,4 +1,3 @@
-# $DragonFly: src/lib/pam_module/pam_opieaccess/Makefile,v 1.2 2005/07/28 19:25:41 joerg Exp $
 
 LIB=   pam_opieaccess
 SRCS=  pam_opieaccess.c
similarity index 79%
rename from lib/pam_module/pam_passwdqc/Makefile
rename to lib/libpam/modules/pam_passwdqc/Makefile
index 00c0776..def7595 100644 (file)
@@ -1,4 +1,4 @@
-CONTRIBDIR= ${.CURDIR}/../../../contrib/pam_passwdqc
+CONTRIBDIR= ${.CURDIR}/../../../../contrib/pam_passwdqc
 .PATH: ${CONTRIBDIR}
 
 LIB=   pam_passwdqc
diff --git a/lib/libpam/modules/pam_permit/Makefile b/lib/libpam/modules/pam_permit/Makefile
new file mode 100644 (file)
index 0000000..0e5229d
--- /dev/null
@@ -0,0 +1,6 @@
+
+LIB=   pam_permit
+SRCS=  pam_permit.c
+MAN=   pam_permit.8
+
+.include <bsd.lib.mk>
similarity index 55%
rename from lib/pam_module/pam_radius/Makefile
rename to lib/libpam/modules/pam_radius/Makefile
index 7613281..175267e 100644 (file)
@@ -1,4 +1,3 @@
-# $DragonFly: src/lib/pam_module/pam_radius/Makefile,v 1.2 2005/07/28 19:25:41 joerg Exp $
 
 LIB=   pam_radius
 SRCS=  pam_radius.c
similarity index 67%
rename from lib/pam_module/pam_ssh/Makefile
rename to lib/libpam/modules/pam_ssh/Makefile
index 7d3a077..ae257b3 100644 (file)
@@ -6,8 +6,8 @@ WARNS?= 4
 LDADD=         -lprivate_ssh -lprivate_crypto -lcrypt
 DPADD=         ${LIBSSH} ${LIBRECRYPTO} ${LIBCRYPT}
 
-CFLAGS+=       -I${.CURDIR}/../../../crypto/openssh
-CFLAGS+=       -I${.CURDIR}/../../../crypto/libressl/include
+CFLAGS+=       -I${.CURDIR}/../../../../crypto/openssh
+CFLAGS+=       -I${.CURDIR}/../../../../crypto/libressl/include
 LDFLAGS+=      -rpath /usr/lib/priv ${PRIVATELIB_LDFLAGS}
 
 .include <bsd.lib.mk>
similarity index 56%
rename from lib/pam_module/pam_tacplus/Makefile
rename to lib/libpam/modules/pam_tacplus/Makefile
index 9c50b33..d776df1 100644 (file)
@@ -1,4 +1,3 @@
-# $DragonFly: src/lib/pam_module/pam_tacplus/Makefile,v 1.4 2005/07/28 19:25:41 joerg Exp $
 
 LIB=   pam_tacplus
 SRCS=  pam_tacplus.c
similarity index 69%
rename from lib/pam_module/pam_unix/Makefile
rename to lib/libpam/modules/pam_unix/Makefile
index e341818..70c62d4 100644 (file)
@@ -1,4 +1,3 @@
-# $DragonFly: src/lib/pam_module/pam_unix/Makefile,v 1.5 2006/02/18 19:40:10 joerg Exp $
 
 LIB=   pam_unix
 SRCS=  pam_unix.c
diff --git a/lib/pam_module/pam_deny/Makefile b/lib/pam_module/pam_deny/Makefile
deleted file mode 100644 (file)
index 316ba07..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# $DragonFly: src/lib/pam_module/pam_deny/Makefile,v 1.2 2005/08/01 16:15:19 joerg Exp $
-
-LIB=   pam_deny
-SRCS=  pam_deny.c
-MAN=   pam_deny.8
-
-.include <bsd.lib.mk>
diff --git a/lib/pam_module/pam_permit/Makefile b/lib/pam_module/pam_permit/Makefile
deleted file mode 100644 (file)
index 900ef48..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# $DragonFly: src/lib/pam_module/pam_permit/Makefile,v 1.2 2005/08/01 16:15:19 joerg Exp $
-
-LIB=   pam_permit
-SRCS=  pam_permit.c
-MAN=   pam_permit.8
-
-.include <bsd.lib.mk>