diff options
author | des <des@FreeBSD.org> | 2003-07-15 07:18:26 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2003-07-15 07:18:26 +0000 |
commit | 4f94712dd14f8e2fd55b14e14daa159df368e451 (patch) | |
tree | 90480c2f7b7437d4ebac16f2a7849084abe7ba6e /contrib/openpam/lib | |
parent | 49e0f275db6cafef33693cb9ac1fdd52cdd63a67 (diff) | |
download | FreeBSD-src-4f94712dd14f8e2fd55b14e14daa159df368e451.zip FreeBSD-src-4f94712dd14f8e2fd55b14e14daa159df368e451.tar.gz |
Vendor import of OpenPAM Dogwood.
Diffstat (limited to 'contrib/openpam/lib')
-rw-r--r-- | contrib/openpam/lib/Makefile.am | 57 | ||||
-rw-r--r-- | contrib/openpam/lib/Makefile.in | 466 | ||||
-rw-r--r-- | contrib/openpam/lib/openpam_borrow_cred.c | 3 | ||||
-rw-r--r-- | contrib/openpam/lib/openpam_impl.h | 6 | ||||
-rw-r--r-- | contrib/openpam/lib/openpam_restore_cred.c | 3 | ||||
-rw-r--r-- | contrib/openpam/lib/openpam_ttyconv.c | 55 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_get_authtok.c | 8 | ||||
-rw-r--r-- | contrib/openpam/lib/pam_get_user.c | 6 |
8 files changed, 582 insertions, 22 deletions
diff --git a/contrib/openpam/lib/Makefile.am b/contrib/openpam/lib/Makefile.am new file mode 100644 index 0000000..4960d52 --- /dev/null +++ b/contrib/openpam/lib/Makefile.am @@ -0,0 +1,57 @@ +NULL = + +INCLUDES = -I$(top_srcdir)/include + +lib_LTLIBRARIES = libpam.la + +libpam_la_SOURCES = \ + openpam_borrow_cred.c \ + openpam_configure.c \ + openpam_dispatch.c \ + openpam_dynamic.c \ + openpam_findenv.c \ + openpam_free_data.c \ + openpam_get_option.c \ + openpam_load.c \ + openpam_log.c \ + openpam_nullconv.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 \ + 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 \ + $(NULL) + +libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@ @DL_LIBS@ + +# Not implemented yet: +# pam_authenticate_secondary.c +# pam_get_mapped_authtok.c +# pam_get_mapped_username.c +# pam_set_mapped_authtok.c +# pam_set_mapped_username.c diff --git a/contrib/openpam/lib/Makefile.in b/contrib/openpam/lib/Makefile.in new file mode 100644 index 0000000..bb0593d --- /dev/null +++ b/contrib/openpam/lib/Makefile.in @@ -0,0 +1,466 @@ +# Makefile.in generated automatically by automake 1.5 from Makefile.am. + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# 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@ + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_HEADER = $(INSTALL_DATA) +transform = @program_transform_name@ +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ +host_alias = @host_alias@ +host_triplet = @host@ +target_alias = @target_alias@ +target_triplet = @target@ +AMTAR = @AMTAR@ +AS = @AS@ +AWK = @AWK@ +CC = @CC@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +CRYPT_LIBS = @CRYPT_LIBS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +EXEEXT = @EXEEXT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBTOOL = @LIBTOOL@ +LIB_MAJ = @LIB_MAJ@ +LN_S = @LN_S@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@ +PACKAGE = @PACKAGE@ +RANLIB = @RANLIB@ +VERSION = @VERSION@ +am__include = @am__include@ +am__quote = @am__quote@ +install_sh = @install_sh@ + +NULL = + +INCLUDES = -I$(top_srcdir)/include + +lib_LTLIBRARIES = libpam.la + +libpam_la_SOURCES = \ + openpam_borrow_cred.c \ + openpam_configure.c \ + openpam_dispatch.c \ + openpam_dynamic.c \ + openpam_findenv.c \ + openpam_free_data.c \ + openpam_get_option.c \ + openpam_load.c \ + openpam_log.c \ + openpam_nullconv.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 \ + 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 \ + $(NULL) + + +libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@ @DL_LIBS@ +subdir = lib +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +LTLIBRARIES = $(lib_LTLIBRARIES) + +libpam_la_LIBADD = +am_libpam_la_OBJECTS = openpam_borrow_cred.lo openpam_configure.lo \ + openpam_dispatch.lo openpam_dynamic.lo openpam_findenv.lo \ + openpam_free_data.lo openpam_get_option.lo openpam_load.lo \ + openpam_log.lo openpam_nullconv.lo openpam_readline.lo \ + openpam_restore_cred.lo openpam_set_option.lo openpam_static.lo \ + openpam_ttyconv.lo pam_acct_mgmt.lo pam_authenticate.lo \ + pam_chauthtok.lo pam_close_session.lo pam_end.lo pam_error.lo \ + pam_get_authtok.lo pam_get_data.lo pam_get_item.lo \ + pam_get_user.lo pam_getenv.lo pam_getenvlist.lo pam_info.lo \ + pam_open_session.lo pam_prompt.lo pam_putenv.lo pam_set_data.lo \ + pam_set_item.lo pam_setcred.lo pam_setenv.lo pam_start.lo \ + pam_strerror.lo pam_verror.lo pam_vinfo.lo pam_vprompt.lo +libpam_la_OBJECTS = $(am_libpam_la_OBJECTS) + +DEFS = @DEFS@ +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +depcomp = $(SHELL) $(top_srcdir)/depcomp +@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/openpam_borrow_cred.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_configure.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_dispatch.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_dynamic.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_findenv.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_free_data.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_get_option.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_load.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_log.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_nullconv.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_readline.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_restore_cred.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_set_option.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_static.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/openpam_ttyconv.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_acct_mgmt.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_authenticate.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_chauthtok.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_close_session.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_end.Plo $(DEPDIR)/pam_error.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_get_authtok.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_get_data.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_get_item.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_get_user.Plo $(DEPDIR)/pam_getenv.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_getenvlist.Plo $(DEPDIR)/pam_info.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_open_session.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_prompt.Plo $(DEPDIR)/pam_putenv.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_set_data.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_set_item.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_setcred.Plo $(DEPDIR)/pam_setenv.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_start.Plo $(DEPDIR)/pam_strerror.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_verror.Plo $(DEPDIR)/pam_vinfo.Plo \ +@AMDEP_TRUE@ $(DEPDIR)/pam_vprompt.Plo +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \ + $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DIST_SOURCES = $(libpam_la_SOURCES) +DIST_COMMON = Makefile.am Makefile.in +SOURCES = $(libpam_la_SOURCES) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign lib/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(libdir) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p"; \ + $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$p; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) +libpam.la: $(libpam_la_OBJECTS) $(libpam_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libpam_la_LDFLAGS) $(libpam_la_OBJECTS) $(libpam_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) core *.core + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_borrow_cred.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_configure.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_dispatch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_dynamic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_findenv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_free_data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_get_option.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_load.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_log.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_nullconv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_readline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_restore_cred.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_set_option.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_static.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpam_ttyconv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_acct_mgmt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_authenticate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_chauthtok.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_close_session.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_end.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_get_authtok.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_get_data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_get_item.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_get_user.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_getenv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_getenvlist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_info.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_open_session.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_prompt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_putenv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_set_data.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_set_item.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_setcred.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_setenv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_start.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_verror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_vinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/pam_vprompt.Plo@am__quote@ + +distclean-depend: + -rm -rf $(DEPDIR) + +.c.o: +@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$< + +.c.obj: +@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(COMPILE) -c `cygpath -w $<` + +.c.lo: +@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + $(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$< +CCDEPMODE = @CCDEPMODE@ +uninstall-info-am: + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(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; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || etags $(ETAGS_ARGS) $$tags $$unique $(LISP) + +GTAGS: + here=`CDPATH=: && cd $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH + +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + $(mkinstalldirs) "$(distdir)/$$dir"; \ + fi; \ + if test -d $$d/$$file; then \ + cp -pR $$d/$$file $(distdir) \ + || 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 $(LTLIBRARIES) + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(libdir) + +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)" \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* + +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-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-compile distclean-depend \ + distclean-generic distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: install-libLTLIBRARIES + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES + +.PHONY: GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool distclean distclean-compile \ + distclean-depend distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool tags uninstall \ + uninstall-am uninstall-info-am uninstall-libLTLIBRARIES + + +# Not implemented yet: +# pam_authenticate_secondary.c +# pam_get_mapped_authtok.c +# pam_get_mapped_username.c +# pam_set_mapped_authtok.c +# pam_set_mapped_username.c +# 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/lib/openpam_borrow_cred.c b/contrib/openpam/lib/openpam_borrow_cred.c index dfd25c2..4a46352 100644 --- a/contrib/openpam/lib/openpam_borrow_cred.c +++ b/contrib/openpam/lib/openpam_borrow_cred.c @@ -31,12 +31,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_borrow_cred.c#9 $ + * $P4: //depot/projects/openpam/lib/openpam_borrow_cred.c#10 $ */ #include <sys/param.h> #include <grp.h> +#include <limits.h> #include <pwd.h> #include <stdlib.h> #include <unistd.h> diff --git a/contrib/openpam/lib/openpam_impl.h b/contrib/openpam/lib/openpam_impl.h index 3786ad2..54ff813 100644 --- a/contrib/openpam/lib/openpam_impl.h +++ b/contrib/openpam/lib/openpam_impl.h @@ -31,12 +31,16 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_impl.h#27 $ + * $P4: //depot/projects/openpam/lib/openpam_impl.h#28 $ */ #ifndef _OPENPAM_IMPL_H_INCLUDED #define _OPENPAM_IMPL_H_INCLUDED +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + #include <security/openpam.h> extern const char *_pam_func_name[PAM_NUM_PRIMITIVES]; diff --git a/contrib/openpam/lib/openpam_restore_cred.c b/contrib/openpam/lib/openpam_restore_cred.c index afa468a..db14d6c 100644 --- a/contrib/openpam/lib/openpam_restore_cred.c +++ b/contrib/openpam/lib/openpam_restore_cred.c @@ -31,12 +31,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_restore_cred.c#8 $ + * $P4: //depot/projects/openpam/lib/openpam_restore_cred.c#9 $ */ #include <sys/param.h> #include <grp.h> +#include <limits.h> #include <pwd.h> #include <stdlib.h> #include <unistd.h> diff --git a/contrib/openpam/lib/openpam_ttyconv.c b/contrib/openpam/lib/openpam_ttyconv.c index 64deba9..48fe70a 100644 --- a/contrib/openpam/lib/openpam_ttyconv.c +++ b/contrib/openpam/lib/openpam_ttyconv.c @@ -31,12 +31,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#20 $ + * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#22 $ */ #include <sys/types.h> #include <ctype.h> +#include <errno.h> #include <setjmp.h> #include <signal.h> #include <stdio.h> @@ -50,14 +51,12 @@ #include "openpam_impl.h" int openpam_ttyconv_timeout = 0; -static jmp_buf jmpenv; -static int timed_out; static void timeout(int sig) { - timed_out = 1; - longjmp(jmpenv, sig); + + (void)sig; } static char * @@ -67,7 +66,10 @@ prompt(const char *msg) struct sigaction action, saved_action; sigset_t saved_sigset, sigset; unsigned int saved_alarm; + int eof, error, fd, timed_out; size_t len; + char *retval; + char ch; sigemptyset(&sigset); sigaddset(&sigset, SIGINT); @@ -78,25 +80,51 @@ prompt(const char *msg) sigemptyset(&action.sa_mask); sigaction(SIGALRM, &action, &saved_action); fputs(msg, stdout); + fflush(stdout); +#ifdef HAVE_FPURGE + fpurge(stdin); +#endif + fd = fileno(stdin); buf[0] = '\0'; timed_out = 0; + eof = error = timed_out = 0; saved_alarm = alarm(openpam_ttyconv_timeout); - if (setjmp(jmpenv) == 0) - fgets(buf, sizeof buf, stdin); - else - fputs(" timeout!\n", stderr); + ch = '\0'; + for (len = 0; ch != '\n' && !eof && !error; ++len) { + switch (read(fd, &ch, 1)) { + case 1: + if (len < PAM_MAX_RESP_SIZE - 1) { + buf[len + 1] = '\0'; + buf[len] = ch; + } + break; + case 0: + eof = 1; + break; + default: + error = errno; + break; + } + } alarm(0); sigaction(SIGALRM, &saved_action, NULL); sigprocmask(SIG_SETMASK, &saved_sigset, NULL); alarm(saved_alarm); - if (timed_out || ferror(stdin) || feof(stdin)) + if (error == EINTR) + fputs(" timeout!", stderr); + if (error || eof) { + fputs("\n", stderr); + memset(buf, 0, sizeof(buf)); return (NULL); + } /* trim trailing whitespace */ for (len = strlen(buf); len > 0; --len) if (!isspace(buf[len - 1])) break; buf[len] = '\0'; - return (strdup(buf)); + retval = strdup(buf); + memset(buf, 0, sizeof(buf)); + return (retval); } static char * @@ -179,7 +207,10 @@ openpam_ttyconv(int n, RETURNC(PAM_SUCCESS); fail: while (i) - FREE(resp[--i]); + if (resp[--i]->resp) { + memset(resp[i]->resp, 0, strlen(resp[i]->resp)); + FREE(resp[i]->resp); + } FREE(*resp); RETURNC(PAM_CONV_ERR); } diff --git a/contrib/openpam/lib/pam_get_authtok.c b/contrib/openpam/lib/pam_get_authtok.c index fba1e76..1df7abf 100644 --- a/contrib/openpam/lib/pam_get_authtok.c +++ b/contrib/openpam/lib/pam_get_authtok.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#25 $ + * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#26 $ */ #include <sys/param.h> @@ -44,9 +44,9 @@ #include "openpam_impl.h" -const char authtok_prompt[] = "Password:"; -const char oldauthtok_prompt[] = "Old Password:"; -const char newauthtok_prompt[] = "New Password:"; +static const char authtok_prompt[] = "Password:"; +static const char oldauthtok_prompt[] = "Old Password:"; +static const char newauthtok_prompt[] = "New Password:"; /* * OpenPAM extension diff --git a/contrib/openpam/lib/pam_get_user.c b/contrib/openpam/lib/pam_get_user.c index 3c30f5f..413056c 100644 --- a/contrib/openpam/lib/pam_get_user.c +++ b/contrib/openpam/lib/pam_get_user.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_user.c#17 $ + * $P4: //depot/projects/openpam/lib/pam_get_user.c#18 $ */ #include <sys/param.h> @@ -43,7 +43,7 @@ #include "openpam_impl.h" -const char user_prompt[] = "Login:"; +static const char user_prompt[] = "Login:"; /* * XSSO 4.2.1 @@ -64,7 +64,7 @@ pam_get_user(pam_handle_t *pamh, if (pamh == NULL || user == NULL) RETURNC(PAM_SYSTEM_ERR); r = pam_get_item(pamh, PAM_USER, (const void **)user); - if (r == PAM_SUCCESS) + if (r == PAM_SUCCESS && *user != NULL) RETURNC(PAM_SUCCESS); if (prompt == NULL) { r = pam_get_item(pamh, PAM_USER_PROMPT, (const void **)&prompt); |