LIB= pam
SRCDIR= ${.CURDIR}/../../contrib/openpam
-CONTRIBDIR= ${SRCDIR}/lib
-PATCHES!= echo ${.CURDIR}/patches/*.patch
-MODULE_DIR= /usr/lib/security
+MODULE_DIR= ${LIBDIR}/security
+CFLAGS+= -DHAVE_CONFIG_H
CFLAGS+= -DOPENPAM_MODULES_DIR='"${MODULE_DIR}/"'
-CFLAGS+= -DLIB_MAJ=${MODULE_SHLIB_MAJOR}
-CFLAGS+= -I${SRCDIR}/lib
+CFLAGS+= -I${SRCDIR}/lib -I${.CURDIR}
-SRCS= openpam_borrow_cred.c openpam_configure.c openpam_dispatch.c
+SRCS= openpam_borrow_cred.c openpam_check_owner_perms.c
+SRCS+= openpam_configure.c openpam_constants.c openpam_dispatch.c
SRCS+= openpam_dynamic.c openpam_findenv.c openpam_free_data.c
SRCS+= openpam_free_envlist.c openpam_get_option.c openpam_load.c
SRCS+= openpam_log.c openpam_nullconv.c openpam_readline.c
SRCS+= openpam_restore_cred.c openpam_set_option.c openpam_static.c
+SRCS+= openpam_subst.c
SRCS+= openpam_ttyconv.c pam_acct_mgmt.c pam_authenticate.c
SRCS+= pam_chauthtok.c pam_close_session.c pam_end.c pam_error.c
SRCS+= pam_get_authtok.c pam_get_data.c pam_get_item.c pam_get_user.c
SRCS+= pam_setenv.c pam_start.c pam_strerror.c pam_verror.c pam_vinfo.c
SRCS+= pam_vprompt.c
SRCS+= pam_debug_log.c
-SRCS+= ${PATCHES}
PAMINCS= openpam.h openpam_version.h pam_appl.h pam_constants.h
PAMINCS+= pam_modules.h pam_types.h openpam_attr.h
MAN= openpam.3 openpam_borrow_cred.3 openpam_free_data.3
MAN+= openpam_free_envlist.3 openpam_get_option.3 openpam_log.3
MAN+= openpam_nullconv.3 openpam_readline.3 openpam_restore_cred.3
-MAN+= openpam_set_option.3 openpam_ttyconv.3 pam.3 pam_acct_mgmt.3
+MAN+= openpam_set_option.3 openpam_subst.3
+MAN+= openpam_ttyconv.3 pam.3 pam_acct_mgmt.3
MAN+= pam_authenticate.3 pam_chauthtok.3 pam_close_session.3 pam_conv.3
MAN+= pam_end.3 pam_error.3 pam_get_authtok.3 pam_get_data.3 pam_get_item.3
MAN+= pam_get_user.3 pam_getenv.3 pam_getenvlist.3 pam_info.3
.PATH: ${SRCDIR}/lib ${SRCDIR}/doc/man
-.include "../pam_module/Makefile.shlib"
.include <bsd.lib.mk>
--- /dev/null
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Whether loading unversioned modules support is disabled */
+/* #undef DISABLE_UNVERSIONED_MODULES */
+
+/* Define to 1 if you have the <crypt.h> header file. */
+/* #undef HAVE_CRYPT_H */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `fpurge' function. */
+#define HAVE_FPURGE 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `crypt' library (-lcrypt). */
+#define HAVE_LIBCRYPT 1
+
+/* Define to 1 if you have the `dl' library (-ldl). */
+/* #undef HAVE_LIBDL */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcmp' function. */
+/* #undef HAVE_STRLCMP */
+
+/* Define to 1 if you have the `strlcpy' function. */
+#define HAVE_STRLCPY 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* OpenPAM library major number */
+#define LIB_MAJ 2
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#define LT_OBJDIR ".libs/"
+
+/* Turn debugging on by default */
+/* #undef OPENPAM_DEBUG */
+
+/* OpenPAM modules directory */
+/* Let the Makefile decide this */
+/* #define OPENPAM_MODULES_DIR "${exec_prefix}/lib/" */
+
+/* Name of package */
+#define PACKAGE "openpam"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "des@des.no"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "OpenPAM"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "OpenPAM 20111218"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "openpam"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "20111218"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Version number of package */
+#define VERSION "20111218"
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#define restrict __restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+ __restrict__, even though the corresponding Sun C compiler ends up with
+ "#define restrict _Restrict" or "#define restrict __restrict__" in the
+ previous line. Perhaps some future version of Sun C++ will work with
+ restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+ code using `volatile' can become incorrect without. Disable with care. */
+/* #undef volatile */