summaryrefslogtreecommitdiffstats
path: root/contrib/openpam/bin
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2012-05-26 17:10:16 +0000
committerdes <des@FreeBSD.org>2012-05-26 17:10:16 +0000
commite591108b4ff3b509a90d50646dac489bd3586c83 (patch)
tree8db8bd736c680a375326928576df3d5395b6a4f3 /contrib/openpam/bin
parent14a6c41ca7a3722b33e2208c83fb8b4a009b0ecf (diff)
parent4d990f74cc8d1f6788d9e35ce8ada48cc0b5f41f (diff)
downloadFreeBSD-src-e591108b4ff3b509a90d50646dac489bd3586c83.zip
FreeBSD-src-e591108b4ff3b509a90d50646dac489bd3586c83.tar.gz
Update to OpenPAM Micrampelis.
Diffstat (limited to 'contrib/openpam/bin')
-rw-r--r--contrib/openpam/bin/Makefile.am4
-rw-r--r--contrib/openpam/bin/Makefile.in6
-rw-r--r--contrib/openpam/bin/openpam_dump_policy/Makefile.am7
-rw-r--r--contrib/openpam/bin/openpam_dump_policy/Makefile.in474
-rw-r--r--contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c202
-rw-r--r--contrib/openpam/bin/pamtest/pamtest.120
-rw-r--r--contrib/openpam/bin/pamtest/pamtest.c19
-rw-r--r--contrib/openpam/bin/su/su.111
8 files changed, 724 insertions, 19 deletions
diff --git a/contrib/openpam/bin/Makefile.am b/contrib/openpam/bin/Makefile.am
index 78ebeaa..ec7a99e 100644
--- a/contrib/openpam/bin/Makefile.am
+++ b/contrib/openpam/bin/Makefile.am
@@ -1,6 +1,6 @@
-# $Id: Makefile.am 467 2011-11-02 23:42:21Z des $
+# $Id: Makefile.am 538 2012-03-31 17:04:29Z des $
-SUBDIRS =
+SUBDIRS = openpam_dump_policy
if WITH_PAMTEST
SUBDIRS += pamtest
diff --git a/contrib/openpam/bin/Makefile.in b/contrib/openpam/bin/Makefile.in
index 4f6089d..3c11bbf 100644
--- a/contrib/openpam/bin/Makefile.in
+++ b/contrib/openpam/bin/Makefile.in
@@ -15,7 +15,7 @@
@SET_MAKE@
-# $Id: Makefile.am 467 2011-11-02 23:42:21Z des $
+# $Id: Makefile.am 538 2012-03-31 17:04:29Z des $
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -63,7 +63,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir
ETAGS = etags
CTAGS = ctags
-DIST_SUBDIRS = pamtest su
+DIST_SUBDIRS = openpam_dump_policy pamtest su
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -207,7 +207,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = $(am__append_1) $(am__append_2)
+SUBDIRS = openpam_dump_policy $(am__append_1) $(am__append_2)
all: all-recursive
.SUFFIXES:
diff --git a/contrib/openpam/bin/openpam_dump_policy/Makefile.am b/contrib/openpam/bin/openpam_dump_policy/Makefile.am
new file mode 100644
index 0000000..a5fda16
--- /dev/null
+++ b/contrib/openpam/bin/openpam_dump_policy/Makefile.am
@@ -0,0 +1,7 @@
+# $Id: Makefile.am 538 2012-03-31 17:04:29Z des $
+
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib
+
+noinst_PROGRAMS = openpam_dump_policy
+openpam_dump_policy_SOURCES = openpam_dump_policy.c
+openpam_dump_policy_LDADD = $(top_builddir)/lib/libpam.la
diff --git a/contrib/openpam/bin/openpam_dump_policy/Makefile.in b/contrib/openpam/bin/openpam_dump_policy/Makefile.in
new file mode 100644
index 0000000..54f09a4
--- /dev/null
+++ b/contrib/openpam/bin/openpam_dump_policy/Makefile.in
@@ -0,0 +1,474 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# $Id: Makefile.am 538 2012-03-31 17:04:29Z des $
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+noinst_PROGRAMS = openpam_dump_policy$(EXEEXT)
+subdir = bin/openpam_dump_policy
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am_openpam_dump_policy_OBJECTS = openpam_dump_policy.$(OBJEXT)
+openpam_dump_policy_OBJECTS = $(am_openpam_dump_policy_OBJECTS)
+openpam_dump_policy_DEPENDENCIES = $(top_builddir)/lib/libpam.la
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(openpam_dump_policy_SOURCES)
+DIST_SOURCES = $(openpam_dump_policy_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CRYPT_LIBS = @CRYPT_LIBS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DL_LIBS = @DL_LIBS@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_MAJ = @LIB_MAJ@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib
+openpam_dump_policy_SOURCES = openpam_dump_policy.c
+openpam_dump_policy_LDADD = $(top_builddir)/lib/libpam.la
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bin/openpam_dump_policy/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign bin/openpam_dump_policy/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+openpam_dump_policy$(EXEEXT): $(openpam_dump_policy_OBJECTS) $(openpam_dump_policy_DEPENDENCIES)
+ @rm -f openpam_dump_policy$(EXEEXT)
+ $(LINK) $(openpam_dump_policy_OBJECTS) $(openpam_dump_policy_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openpam_dump_policy.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c b/contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c
new file mode 100644
index 0000000..b65dbbd
--- /dev/null
+++ b/contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c
@@ -0,0 +1,202 @@
+/*-
+ * Copyright (c) 2011 Dag-Erling Smørgrav
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in this position and unchanged.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: openpam_dump_policy.c 582 2012-04-06 23:23:35Z des $
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <security/pam_appl.h>
+
+#include "openpam_impl.h"
+
+static char *
+openpam_chain_name(const char *service, pam_facility_t fclt)
+{
+ const char *facility = pam_facility_name[fclt];
+ char *name;
+
+ if (asprintf(&name, "pam_%s_%s", service, facility) == -1)
+ return (NULL);
+ return (name);
+}
+
+static char *
+openpam_facility_index_name(pam_facility_t fclt)
+{
+ const char *facility = pam_facility_name[fclt];
+ char *name, *p;
+
+ if (asprintf(&name, "PAM_%s", facility) == -1)
+ return (NULL);
+ for (p = name + 4; *p; ++p)
+ *p = toupper(*p);
+ return (name);
+}
+
+int
+openpam_dump_chain(const char *name, pam_chain_t *chain)
+{
+ char *modname, **opt, *p;
+ int i;
+
+ for (i = 0; chain != NULL; ++i, chain = chain->next) {
+ /* declare the module's struct pam_module */
+ modname = strrchr(chain->module->path, '/');
+ modname = strdup(modname ? modname : chain->module->path);
+ if (modname == NULL)
+ return (PAM_BUF_ERR);
+ for (p = modname; *p && *p != '.'; ++p)
+ /* nothing */ ;
+ *p = '\0';
+ printf("extern struct pam_module %s_pam_module;\n", modname);
+ /* module arguments */
+ printf("static char *%s_%d_optv[] = {\n", name, i);
+ for (opt = chain->optv; *opt; ++opt) {
+ printf("\t\"");
+ for (p = *opt; *p; ++p) {
+ if (isprint((unsigned char)*p) && *p != '"')
+ printf("%c", *p);
+ else
+ printf("\\x%02x", (unsigned char)*p);
+ }
+ printf("\",\n");
+ }
+ printf("\tNULL,\n");
+ printf("};\n");
+ /* next module in chain */
+ if (chain->next != NULL)
+ printf("static pam_chain_t %s_%d;\n", name, i + 1);
+ /* chain entry */
+ printf("static pam_chain_t %s_%d = {\n", name, i);
+ printf("\t.module = &%s_pam_module,\n", modname);
+ printf("\t.flag = 0x%08x,\n", chain->flag);
+ printf("\t.optc = %d,\n", chain->optc);
+ printf("\t.optv = %s_%d_optv,\n", name, i);
+ if (chain->next)
+ printf("\t.next = &%s_%d,\n", name, i + 1);
+ else
+ printf("\t.next = NULL,\n");
+ printf("};\n");
+ free(modname);
+ }
+ return (PAM_SUCCESS);
+}
+
+int
+openpam_dump_policy(const char *service)
+{
+ pam_handle_t *pamh;
+ char *name;
+ int fclt, ret;
+
+ if ((pamh = calloc(1, sizeof *pamh)) == NULL)
+ return (PAM_BUF_ERR);
+ if ((ret = openpam_configure(pamh, service)) != PAM_SUCCESS)
+ return (ret);
+ for (fclt = 0; fclt < PAM_NUM_FACILITIES; ++fclt) {
+ if (pamh->chains[fclt] != NULL) {
+ if ((name = openpam_chain_name(service, fclt)) == NULL)
+ return (PAM_BUF_ERR);
+ ret = openpam_dump_chain(name, pamh->chains[fclt]);
+ free(name);
+ if (ret != PAM_SUCCESS)
+ return (ret);
+ }
+ }
+ printf("static pam_policy_t pam_%s_policy = {\n", service);
+ printf("\t.service = \"%s\",\n", service);
+ printf("\t.chains = {\n");
+ for (fclt = 0; fclt < PAM_NUM_FACILITIES; ++fclt) {
+ if ((name = openpam_facility_index_name(fclt)) == NULL)
+ return (PAM_BUF_ERR);
+ printf("\t\t[%s] = ", name);
+ free(name);
+ if (pamh->chains[fclt] != NULL) {
+ if ((name = openpam_chain_name(service, fclt)) == NULL)
+ return (PAM_BUF_ERR);
+ printf("&%s_0,\n", name);
+ free(name);
+ } else {
+ printf("NULL,\n");
+ }
+ }
+ printf("\t},\n");
+ printf("};\n");
+ free(pamh);
+ return (PAM_SUCCESS);
+}
+
+static void
+usage(void)
+{
+
+ fprintf(stderr, "usage: openpam_dump_policy [-d] policy ...\n");
+ exit(1);
+}
+
+int
+main(int argc, char *argv[])
+{
+ int i, opt;
+
+ while ((opt = getopt(argc, argv, "d")) != -1)
+ switch (opt) {
+ case 'd':
+ openpam_debug = 1;
+ break;
+ default:
+ usage();
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argc < 1)
+ usage();
+
+ printf("#include <security/pam_appl.h>\n");
+ printf("#include \"openpam_impl.h\"\n");
+ for (i = 0; i < argc; ++i)
+ openpam_dump_policy(argv[i]);
+ printf("pam_policy_t *pam_embedded_policies[] = {\n");
+ for (i = 0; i < argc; ++i)
+ printf("\t&pam_%s_policy,\n", argv[i]);
+ printf("\tNULL,\n");
+ printf("};\n");
+ exit(0);
+}
diff --git a/contrib/openpam/bin/pamtest/pamtest.1 b/contrib/openpam/bin/pamtest/pamtest.1
index 78e8353..5cf2e0c 100644
--- a/contrib/openpam/bin/pamtest/pamtest.1
+++ b/contrib/openpam/bin/pamtest/pamtest.1
@@ -10,6 +10,9 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior written
+.\" permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -23,9 +26,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: pamtest.1 471 2011-11-03 09:44:40Z des $
+.\" $Id: pamtest.1 610 2012-05-26 14:03:45Z des $
.\"
-.Dd November 2, 2011
+.Dd May 26, 2012
.Dt PAMTEST 1
.Os
.Sh NAME
@@ -33,7 +36,7 @@
.Nd PAM policy tester
.Sh SYNOPSYS
.Nm
-.Op Fl dksv
+.Op Fl dkMPsv
.Op Fl H Ar rhost
.Op Fl h Ar host
.Op Fl t Ar tty
@@ -116,6 +119,11 @@ The default is to use the result of calling
.Xr gethostname 3 .
.It Fl k
Keep going even if one of the commands fails.
+.It Fl M
+Disable path, ownership and permission checks on module files.
+.It Fl P
+Disable service name validation and path, ownership and permission
+checks on policy files.
.It Fl s
Set the
.Dv PAM_SILENT
@@ -149,14 +157,14 @@ policy:
pamtest -v system auth account change setcred open close unsetcred
.Ed
.Sh SEE ALSO
-.Xr openpam 3
-.Xr pam 3
+.Xr openpam 3 ,
+.Xr pam 3 ,
.Xr pam.conf 5
.Sh AUTHORS
The
.Nm
utility and this manual page were written by
-.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
+.An Dag-Erling Sm\(/orgrav Aq des@des.no .
.Sh BUGS
The
.Nm
diff --git a/contrib/openpam/bin/pamtest/pamtest.c b/contrib/openpam/bin/pamtest/pamtest.c
index 0addfad..bfc612e 100644
--- a/contrib/openpam/bin/pamtest/pamtest.c
+++ b/contrib/openpam/bin/pamtest/pamtest.c
@@ -11,6 +11,9 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -24,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pamtest.c 472 2011-11-03 09:46:52Z des $
+ * $Id: pamtest.c 595 2012-04-14 14:28:35Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -261,8 +264,8 @@ static void
usage(void)
{
- fprintf(stderr, "usage: pamtest [-dksv] %s\n",
- "[-H rhost] [-h host] [-t tty] [-U ruser] [-u user] service");
+ fprintf(stderr, "usage: pamtest %s service command ...\n",
+ "[-dkMPsv] [-H rhost] [-h host] [-t tty] [-U ruser] [-u user]");
exit(1);
}
@@ -297,7 +300,7 @@ main(int argc, char *argv[])
int pame;
int opt;
- while ((opt = getopt(argc, argv, "dH:h:kst:U:u:v")) != -1)
+ while ((opt = getopt(argc, argv, "dH:h:kMPst:U:u:v")) != -1)
switch (opt) {
case 'd':
openpam_debug++;
@@ -311,6 +314,14 @@ main(int argc, char *argv[])
case 'k':
keepatit = 1;
break;
+ case 'M':
+ openpam_set_feature(OPENPAM_RESTRICT_MODULE_NAME, 0);
+ openpam_set_feature(OPENPAM_VERIFY_MODULE_FILE, 0);
+ break;
+ case 'P':
+ openpam_set_feature(OPENPAM_RESTRICT_SERVICE_NAME, 0);
+ openpam_set_feature(OPENPAM_VERIFY_POLICY_FILE, 0);
+ break;
case 's':
silent = PAM_SILENT;
break;
diff --git a/contrib/openpam/bin/su/su.1 b/contrib/openpam/bin/su/su.1
index 9a67ea3..2dc11bb 100644
--- a/contrib/openpam/bin/su/su.1
+++ b/contrib/openpam/bin/su/su.1
@@ -10,6 +10,9 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
+.\" 3. The name of the author may not be used to endorse or promote
+.\" products derived from this software without specific prior written
+.\" permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -23,9 +26,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: su.1 458 2011-11-02 13:10:25Z des $
+.\" $Id: su.1 610 2012-05-26 14:03:45Z des $
.\"
-.Dd November 2, 2011
+.Dd May 26, 2012
.Dt SU 1
.Os
.Sh NAME
@@ -53,10 +56,10 @@ The
utility is provided with the OpenPAM library as a sample application
and should not be used in production systems.
.Sh SEE ALSO
-.Xr openpam 3
+.Xr openpam 3 ,
.Xr pam 3
.Sh AUTHORS
The
.Nm
utility and this manual page were written by
-.An Dag-Erling Sm\(/orgrav Aq des@FreeBSD.org .
+.An Dag-Erling Sm\(/orgrav Aq des@des.no .
OpenPOWER on IntegriCloud