summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in55
-rw-r--r--aclocal.m4173
-rw-r--r--alpine/Makefile.am3
-rw-r--r--alpine/Makefile.in34
-rw-r--r--alpine/alpine.c18
-rw-r--r--alpine/arg.c76
-rw-r--r--alpine/imap.c62
-rw-r--r--alpine/keymenu.c2
-rw-r--r--alpine/keymenu.h1
-rw-r--r--alpine/makefile.wnt4
-rw-r--r--alpine/osdep/Makefile.in28
-rw-r--r--alpine/xoauth2.h73
-rw-r--r--alpine/xoauth2conf.c399
-rw-r--r--alpine/xoauth2conf.h27
-rw-r--r--imap/src/c-client/auth_oa2.c16
-rw-r--r--imap/src/c-client/mail.c7
-rw-r--r--imap/src/c-client/mail.h8
-rw-r--r--m4/Makefile.in24
-rw-r--r--pico/Makefile.in28
-rw-r--r--pico/osdep/Makefile.in28
-rw-r--r--pith/Makefile.in28
-rw-r--r--pith/charconv/Makefile.in28
-rw-r--r--pith/conf.c6
-rw-r--r--pith/conftype.h1
-rw-r--r--pith/osdep/Makefile.in28
-rw-r--r--pith/pine.hlp62
-rw-r--r--web/src/Makefile.in23
-rw-r--r--web/src/alpined.d/Makefile.in28
-rw-r--r--web/src/pubcookie/Makefile.in29
29 files changed, 1089 insertions, 210 deletions
diff --git a/Makefile.in b/Makefile.in
index e1bb7b17..2c237389 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -25,7 +25,17 @@
#
# ========================================================================
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -89,11 +99,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/configure $(am__configure_deps) \
- $(top_srcdir)/include/config.h.in mkinstalldirs ABOUT-NLS \
- README compile config.guess config.rpath config.sub depcomp \
- install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -106,6 +111,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -199,6 +206,10 @@ ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/include/config.h.in ABOUT-NLS README compile \
+ config.guess config.rpath config.sub depcomp install-sh \
+ ltmain.sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -439,7 +450,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -460,8 +470,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
include/config.h: include/stamp-h1
- @if test ! -f $@; then rm -f include/stamp-h1; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1; else :; fi
+ @test -f $@ || rm -f include/stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1
include/stamp-h1: $(top_srcdir)/include/config.h.in $(top_builddir)/config.status
@rm -f include/stamp-h1
@@ -697,7 +707,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
@@ -713,11 +723,17 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@@ -735,7 +751,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@@ -745,22 +761,23 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
- mkdir $(distdir)/_build $(distdir)/_inst
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -948,6 +965,8 @@ uninstall-man: uninstall-man1
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-local uninstall-man uninstall-man1
+.PRECIOUS: Makefile
+
.PHONY: c-client.d c-client gssapi_proxy.l
diff --git a/aclocal.m4 b/aclocal.m4
index d04e20f9..0aea4818 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.13'
+[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.13.4], [],
+m4_if([$1], [1.15.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.13.4])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -103,15 +103,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -142,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -333,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -409,7 +408,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -418,6 +417,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -493,8 +498,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -526,6 +531,51 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
@@ -534,7 +584,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
@@ -556,7 +605,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -567,7 +616,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -577,7 +626,7 @@ if test x"${install_sh}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -599,7 +648,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -634,7 +683,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -684,7 +733,7 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -723,7 +772,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -752,9 +801,73 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -835,7 +948,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -895,7 +1008,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -923,7 +1036,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -942,7 +1055,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/alpine/Makefile.am b/alpine/Makefile.am
index fc38b9c6..b2122061 100644
--- a/alpine/Makefile.am
+++ b/alpine/Makefile.am
@@ -21,7 +21,8 @@ alpine_SOURCES = addrbook.c adrbkcmd.c after.c alpine.c arg.c busy.c colorconf.c
confscroll.c context.c dispfilt.c flagmaint.c folder.c help.c imap.c \
init.c kblock.c keymenu.c ldapconf.c listsel.c mailcmd.c mailindx.c \
mailpart.c mailview.c newuser.c pattern.c pipe.c print.c radio.c remote.c reply.c \
- roleconf.c send.c setup.c signal.c status.c takeaddr.c titlebar.c smime.c newmail.c
+ roleconf.c send.c setup.c signal.c status.c takeaddr.c titlebar.c smime.c \
+ newmail.c xoauth2conf.c
alpine_LDADD = $(LDADD) $(INTLLIBS)
diff --git a/alpine/Makefile.in b/alpine/Makefile.in
index 80a6faa4..4f96e890 100644
--- a/alpine/Makefile.in
+++ b/alpine/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,17 @@
# ========================================================================
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -92,8 +102,6 @@ build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = alpine$(EXEEXT) rpdump$(EXEEXT) rpload$(EXEEXT)
subdir = alpine
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -106,6 +114,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -124,7 +133,7 @@ am_alpine_OBJECTS = addrbook.$(OBJEXT) adrbkcmd.$(OBJEXT) \
remote.$(OBJEXT) reply.$(OBJEXT) roleconf.$(OBJEXT) \
send.$(OBJEXT) setup.$(OBJEXT) signal.$(OBJEXT) \
status.$(OBJEXT) takeaddr.$(OBJEXT) titlebar.$(OBJEXT) \
- smime.$(OBJEXT) newmail.$(OBJEXT)
+ smime.$(OBJEXT) newmail.$(OBJEXT) xoauth2conf.$(OBJEXT)
nodist_alpine_OBJECTS = date.$(OBJEXT)
alpine_OBJECTS = $(am_alpine_OBJECTS) $(nodist_alpine_OBJECTS)
am__DEPENDENCIES_1 =
@@ -217,6 +226,8 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -421,7 +432,8 @@ alpine_SOURCES = addrbook.c adrbkcmd.c after.c alpine.c arg.c busy.c colorconf.c
confscroll.c context.c dispfilt.c flagmaint.c folder.c help.c imap.c \
init.c kblock.c keymenu.c ldapconf.c listsel.c mailcmd.c mailindx.c \
mailpart.c mailview.c newuser.c pattern.c pipe.c print.c radio.c remote.c reply.c \
- roleconf.c send.c setup.c signal.c status.c takeaddr.c titlebar.c smime.c newmail.c
+ roleconf.c send.c setup.c signal.c status.c takeaddr.c titlebar.c smime.c \
+ newmail.c xoauth2conf.c
alpine_LDADD = $(LDADD) $(INTLLIBS)
rpdump_LDADD = $(LDADD) $(INTLLIBS)
@@ -454,7 +466,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign alpine/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign alpine/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -582,20 +593,21 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/takeaddr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/titlebar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xoauth2conf.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -894,6 +906,8 @@ uninstall-am: uninstall-binPROGRAMS
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-binPROGRAMS
+.PRECIOUS: Makefile
+
date.c:
echo "char datestamp[]="\"$(ALPINE_DATESTAMP)\"";" > date.c
diff --git a/alpine/alpine.c b/alpine/alpine.c
index a4e8f3f3..cd9899a5 100644
--- a/alpine/alpine.c
+++ b/alpine/alpine.c
@@ -41,6 +41,7 @@ static char rcsid[] = "$Id: alpine.c 1266 2009-07-14 18:39:12Z hubert@u.washingt
#include "context.h"
#include "mailview.h"
#include "imap.h"
+#include "xoauth2conf.h"
#include "radio.h"
#include "folder.h"
#include "send.h"
@@ -63,6 +64,7 @@ static char rcsid[] = "$Id: alpine.c 1266 2009-07-14 18:39:12Z hubert@u.washingt
#include "after.h"
#include "smime.h"
#include "newmail.h"
+#include "xoauth2conf.h"
#ifndef _WINDOWS
#include "../pico/osdep/raw.h" /* for STD*_FD */
#endif
@@ -341,6 +343,7 @@ main(int argc, char **argv)
mail_parameters(NULL, SET_FREEELTSPAREP, (void *) free_pine_elt);
mail_parameters(NULL, SET_FREEBODYSPAREP, (void *) free_body_sparep);
mail_parameters(NULL, SET_OA2CLIENTGETACCESSCODE, (void *) oauth2_get_access_code);
+ mail_parameters(NULL, SET_OA2CLIENTINFO, (void *) oauth2_get_client_info);
init_pinerc(pine_state, &init_pinerc_debugging);
@@ -2362,6 +2365,10 @@ choose_setup_cmd(int cmd, MSGNO_S *msgmap, SCROLL_S *sparms)
srv->cmd = 'c';
break;
+ case MC_XOAUTH2 :
+ srv->cmd = 'u';
+ break;
+
case MC_SIG :
srv->cmd = 's';
break;
@@ -2569,6 +2576,11 @@ setup_menu(struct pine *ps)
}
so_puts(store, "\n");
+ so_puts(store, _("(U) xoaUth2:\n"));
+ so_puts(store, _(" Set client-id and client-secret to use the XOAUTH2\n"));
+ so_puts(store, _(" authenticator.\n"));
+
+ so_puts(store, "\n");
so_puts(store, _("(Z) RemoteConfigSetup:\n"));
so_puts(store, _(" This is a command you will probably only want to use once, if at all.\n"));
so_puts(store, _(" It helps you transfer your Alpine configuration data to an IMAP server,\n"));
@@ -2802,6 +2814,12 @@ do_setup_task(int command)
ps_global->mangled_screen = 1;
break;
+ /*----- XOAUTH2 CLIENT CONFIGURATION -----*/
+ case 'u':
+ alpine_xoauth2_configuration(ps_global, edit_exceptions);
+ ps_global->mangled_screen = 1;
+ break;
+
/*----- COLLECTION LIST -----*/
case 'l':
folder_config_screen(ps_global, edit_exceptions);
diff --git a/alpine/arg.c b/alpine/arg.c
index 05acc7ab..bf19cb4e 100644
--- a/alpine/arg.c
+++ b/alpine/arg.c
@@ -33,7 +33,7 @@ static char rcsid[] = "$Id: arg.c 900 2008-01-05 01:13:26Z hubert@u.washington.e
#include "imap.h"
#include "arg.h"
-
+#include "xoauth2conf.h"
int process_debug_str(char *);
void args_add_attach(PATMT **, char *, int);
@@ -80,7 +80,10 @@ static char args_err_d_error[] = N_("-d argument \"%s\": %s");
static char args_err_internal[] = "%s";
static char args_err_missing_copyprc[] = N_("missing argument for option \"-copy_pinerc\"\nUsage: pine -copy_pinerc <local_pinerc> <remote_pinerc>");
static char args_err_missing_copyabook[] = N_("missing argument for option \"-copy_abook\"\nUsage: pine -copy_abook <local_abook> <remote_abook>");
-
+static char args_err_missing_server_name[] = N_("missing server name. Example: -xoauth2-server Gmail");
+static char args_err_missing_client_id[] = N_("missing client-id name. Example: -xoauth2-client-id 760.someserver.com");
+static char args_err_missing_client_secret[] = N_("missing client-secret name. Example: -xoauth2-client-secret V56i0fa_");
+static char args_err_missing_xoauth_option[] = N_("at least one of the arguments -xoauth2-server, or -xoauth2-client-id, or -xoauth2-client-secret is missing.");
static char *args_pine_args[] = {
N_("Possible Starting Arguments for Alpine program:"),
@@ -173,6 +176,10 @@ N_(" -install \tPrompt for some basic setup information"),
N_(" -uninstall \tRemove traces of Alpine from Windows system settings"),
N_(" -registry <cmd>\tWhere cmd is set,noset,clear,clearsilent,dump"),
#endif
+N_(" -xoauth2-server <value>"),
+N_(" -xoauth2-client-id <value>"),
+N_(" -xoauth2-client-secret <value>"),
+N_("\tNote: All of -xoauth options above must be used, if any of them is used"),
" -<option>=<value> Assign <value> to the pinerc option <option>",
"\t\t e.g. -signature-file=sig1",
"\t\t e.g. -color-style=no-color",
@@ -210,6 +217,9 @@ pine_args(struct pine *pine_state, int argc, char **argv, ARGDATA_S *args)
char *sort = NULL;
char *pinerc_file = NULL;
char *lc = NULL;
+ char *xoauth2_server = NULL;
+ char *xoauth2_client_id = NULL;
+ char *xoauth2_client_secret = NULL;
int do_help = 0;
int do_conf = 0;
int usage = 0;
@@ -543,6 +553,48 @@ Loop: while(--ac > 0)
do_version = 1;
goto Loop;
}
+ else if(strcmp(*av, "xoauth2-server") == 0){
+ if(--ac){
+ if((str = *++av) != NULL){
+ if(xoauth2_server)
+ fs_give((void **) &xoauth2_server);
+ xoauth2_server = cpystr(str);
+ }
+ }
+ else{
+ display_args_err(_(args_err_missing_server_name), NULL, 1);
+ ++usage;
+ }
+ goto Loop;
+ }
+ else if(strcmp(*av, "xoauth2-client-id") == 0){
+ if(--ac){
+ if((str = *++av) != NULL){
+ if(xoauth2_client_id)
+ fs_give((void **) &xoauth2_client_id);
+ xoauth2_client_id = cpystr(str);
+ }
+ }
+ else{
+ display_args_err(_(args_err_missing_client_id), NULL, 1);
+ ++usage;
+ }
+ goto Loop;
+ }
+ else if(strcmp(*av, "xoauth2-client-secret") == 0){
+ if(--ac){
+ if((str = *++av) != NULL){
+ if(xoauth2_client_secret)
+ fs_give((void **) &xoauth2_client_secret);
+ xoauth2_client_secret = cpystr(str);
+ }
+ }
+ else{
+ display_args_err(_(args_err_missing_client_secret), NULL, 1);
+ ++usage;
+ }
+ goto Loop;
+ }
#ifdef _WINDOWS
else if(strcmp(*av, "install") == 0){
pine_state->install_flag = 1;
@@ -890,12 +942,32 @@ Loop: while(--ac > 0)
exit(-1);
}
+ if((xoauth2_server || xoauth2_client_id || xoauth2_client_secret)
+ && !(xoauth2_server && xoauth2_client_id && xoauth2_client_secret)){
+ display_args_err(_(args_err_missing_xoauth_option), NULL, 1);
+ ++usage;
+ }
+
if(do_help || usage)
args_help();
if(usage)
exit(-1);
+ if(xoauth2_server){
+ char *tmp1, *tmp2;
+ tmp2 = xoauth_config_line(xoauth2_server, xoauth2_client_id, xoauth2_client_secret);
+ if(tmp2){
+ tmp1 = fs_get((strlen(ps_global->vars[V_XOAUTH2_INFO].name) + strlen(tmp2) + 2)*sizeof(char));
+ if(tmp1){
+ sprintf(tmp1,"%s=%s", ps_global->vars[V_XOAUTH2_INFO].name, tmp2);
+ pinerc_cmdline_opt(tmp1);
+ fs_give((void **) &tmp1);
+ }
+ fs_give((void **) &tmp2);
+ }
+ }
+
if(do_version){
extern char datestamp[], hoststamp[];
char rev[128];
diff --git a/alpine/imap.c b/alpine/imap.c
index 49a1a6bd..fe38c06f 100644
--- a/alpine/imap.c
+++ b/alpine/imap.c
@@ -131,6 +131,68 @@ int init_wincred_funcs(void);
static char *details_cert, *details_host, *details_reason;
+extern XOAUTH2_INFO_S xoauth_default[];
+
+/*
+ * This is the private information of the client, which is passed to
+ * c-client for processing. Every c-client application must have its
+ * own.
+ */
+OAUTH2_S alpine_oauth2_list[] =
+{
+ {GMAIL_NAME,
+ {"imap.gmail.com", "smtp.gmail.com", NULL, NULL},
+ {{"client_id", NULL},
+ {"client_secret", NULL},
+ {"code", NULL},
+ {"refresh_token", NULL},
+ {"scope", "https://mail.google.com/"},
+ {"redirect_uri", "urn:ietf:wg:oauth:2.0:oob"},
+ {"grant_type", "authorization_code"},
+ {"grant_type", "refresh_token"},
+ {"response_type", "code"},
+ {"state", NULL},
+ {"prompt", NULL}
+ },
+ {{"GET", "https://accounts.google.com/o/oauth2/auth",
+ {OA2_Id, OA2_Scope, OA2_Redirect, OA2_Response, OA2_End, OA2_End, OA2_End}},
+ {"POST", "https://accounts.google.com/o/oauth2/token",
+ {OA2_Id, OA2_Secret, OA2_Redirect, OA2_GrantTypeforAccessToken, OA2_Code, OA2_End, OA2_End}},
+ {"POST", "https://accounts.google.com/o/oauth2/token",
+ {OA2_Id, OA2_Secret, OA2_RefreshToken, OA2_GrantTypefromRefreshToken, OA2_End, OA2_End, OA2_End}}
+ },
+ NULL, 0
+ },
+#if 0
+ {"Outlook",
+ {"outlook.office365.com", "smtp.gmail.com", NULL, NULL},
+// {{"client_id", "2d681b88-9675-4ff0-b033-4de97dcb7a04"},
+// {"client_secret", "FHLY770;@%fmrzxbnEKG44!"},
+ {{"client_id", NULL},
+ {"client_secret", NULL},
+ {"code", NULL},
+ {"refresh_token", NULL},
+ {"scope", "openid offline_access profile https://outlook.office.com/mail.readwrite https://outlook.office.com/mail.readwrite.shared https://outlook.office.com/mail.send https://outlook.office.com/mail.send.shared https://outlook.office.com/calendars.readwrite https://outlook.office.com/calendars.readwrite.shared https://outlook.office.com/contacts.readwrite https://outlook.office.com/contacts.readwrite.shared https://outlook.office.com/tasks.readwrite https://outlook.office.com/tasks.readwrite.shared https://outlook.office.com/mailboxsettings.readwrite https://outlook.office.com/people.read https://outlook.office.com/user.readbasic.all"},
+ {"redirect_uri", "https://login.microsoftonline.com/common/oauth2/nativeclient"},
+ {"grant_type", "authorization_code"},
+ {"grant_type", "refresh_token"},
+ {"response_type", "code"},
+ {"state", NULL},
+ {"prompt", "login"}
+ },
+ {{"GET", "https://login.microsoftonline.com/common/oauth2/authorize",
+ {OA2_Id, OA2_Scope, OA2_Redirect, OA2_Response, OA2_State, OA2_Prompt, OA2_End}},
+ {"POST", "https://login.microsoftonline.com/common/oauth2/token",
+ {OA2_Id, OA2_Secret, OA2_Redirect, OA2_GrantTypeforAccessToken, OA2_Code, OA2_Scope, OA2_End}},
+ {"POST", "https://login.microsoftonline.com/common/oauth2/token",
+ {OA2_Id, OA2_Secret, OA2_RefreshToken, OA2_GrantTypefromRefreshToken, OA2_End, OA2_End, OA2_End}}
+ },
+ NULL, 0
+ },
+#endif
+ { NULL, NULL, NULL, NULL, NULL, 0},
+};
+
typedef struct auth_code_s {
char *code;
int answer;
diff --git a/alpine/keymenu.c b/alpine/keymenu.c
index fa0cb14c..1df6e2fa 100644
--- a/alpine/keymenu.c
+++ b/alpine/keymenu.c
@@ -994,7 +994,7 @@ struct key choose_setup_keys[] =
{"Z",N_("RemoteConfigSetup"),{MC_REMOTE,1,{'z'}},KS_NONE},
/* TRANSLATORS: configure S/MIME */
{"M",N_("S/Mime"),{MC_SECURITY,1,{'m'}},KS_NONE},
- NULL_MENU,
+ {"U",N_("xoaUth2"),{MC_XOAUTH2,1,{'u'}},KS_NONE},
PREVPAGE_MENU,
NEXTPAGE_MENU,
NULL_MENU,
diff --git a/alpine/keymenu.h b/alpine/keymenu.h
index 7c57411f..3885e443 100644
--- a/alpine/keymenu.h
+++ b/alpine/keymenu.h
@@ -215,6 +215,7 @@ struct key_menu {
#define MC_DECRYPT 802
#define MC_QUOTA 803
#define MC_ADDHEADER 804
+#define MC_XOAUTH2 805
/* Commands for S/MIME screens */
diff --git a/alpine/makefile.wnt b/alpine/makefile.wnt
index 93191b87..7d708724 100644
--- a/alpine/makefile.wnt
+++ b/alpine/makefile.wnt
@@ -46,7 +46,7 @@ HFILES= ../include/system.h ../include/general.h \
conftype.h context.h dispfilt.h flagmaint.h folder.h headers.h help.h imap.h \
init.h kblock.h keymenu.h ldapconf.h listsel.h mailcmd.h mailindx.h mailpart.h \
mailview.h newmail.h newuser.h pattern.h pipe.h print.h radio.h remote.h \
- reply.h roleconf.h \
+ reply.h roleconf.h xoauth2conf.h \
send.h setup.h signal.h status.h takeaddr.h talk.h titlebar.h
OFILES= addrbook.obj adrbkcmd.obj after.obj alpine.obj arg.obj busy.obj colorconf.obj \
@@ -56,7 +56,7 @@ OFILES= addrbook.obj adrbkcmd.obj after.obj alpine.obj arg.obj busy.obj colorcon
newuser.obj pattern.obj pipe.obj \
print.obj radio.obj remote.obj reply.obj roleconf.obj \
send.obj setup.obj signal.obj smime.obj status.obj \
- takeaddr.obj titlebar.obj
+ takeaddr.obj titlebar.obj xoauth2conf.obj
OURLIBS= ../c-client/cclient.lib osdep/libalpineosd.lib osdep/mswin.res \
../pith/osdep/libpithosd.lib ../pith/charconv/libpithcc.lib ../regex/libregex.lib ../pith/libpith.lib \
diff --git a/alpine/osdep/Makefile.in b/alpine/osdep/Makefile.in
index a9659691..0bd2c0da 100644
--- a/alpine/osdep/Makefile.in
+++ b/alpine/osdep/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -26,7 +26,17 @@
# ========================================================================
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -90,8 +100,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = alpine/osdep
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -104,6 +112,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -186,6 +195,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALPINE_DATESTAMP = @ALPINE_DATESTAMP@
@@ -383,7 +394,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign alpine/osdep/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign alpine/osdep/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -433,14 +443,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -658,6 +668,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# 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.
diff --git a/alpine/xoauth2.h b/alpine/xoauth2.h
index c5a65ddb..c9c69974 100644
--- a/alpine/xoauth2.h
+++ b/alpine/xoauth2.h
@@ -15,63 +15,18 @@
#ifndef ALPINE_XOAUTH2_INCLUDED
#define ALPINE_XOAUTH2_INCLUDED
-/*
- * This is the private information of the client, which is passed to
- * c-client for processing. Every c-client application must have its
- * own.
- */
-OAUTH2_S alpine_oauth2_list[] =
-{
- {"Gmail",
- {"imap.gmail.com", "smtp.gmail.com", NULL, NULL},
- {{"client_id", "624395471329-0qee3goofj7kbl7hsukou3rqq0igntv1.apps.googleusercontent.com"},
- {"client_secret", "vwnqVJQrJZpR6JilCfAN5nY7"},
- {"code", NULL},
- {"refresh_token", NULL},
- {"scope", "https://mail.google.com/"},
- {"redirect_uri", "urn:ietf:wg:oauth:2.0:oob"},
- {"grant_type", "authorization_code"},
- {"grant_type", "refresh_token"},
- {"response_type", "code"},
- {"state", NULL},
- {"prompt", NULL}
- },
- {{"GET", "https://accounts.google.com/o/oauth2/auth",
- {OA2_Id, OA2_Scope, OA2_Redirect, OA2_Response, OA2_End, OA2_End, OA2_End}},
- {"POST", "https://accounts.google.com/o/oauth2/token",
- {OA2_Id, OA2_Secret, OA2_Redirect, OA2_GrantTypeforAccessToken, OA2_Code, OA2_End, OA2_End}},
- {"POST", "https://accounts.google.com/o/oauth2/token",
- {OA2_Id, OA2_Secret, OA2_RefreshToken, OA2_GrantTypefromRefreshToken, OA2_End, OA2_End, OA2_End}}
- },
- NULL, 0
- },
-#if 0
- {"Outlook",
- {"outlook.office365.com", "smtp.gmail.com", NULL, NULL},
-// {{"client_id", "2d681b88-9675-4ff0-b033-4de97dcb7a04"},
-// {"client_secret", "FHLY770;@%fmrzxbnEKG44!"},
- {{"client_id", "c8df0dbf-4750-4bb9-98e9-562b10caa26a"},
- {"client_secret", "ijrmPVDYP4yxbNL3442;!!_"},
- {"code", NULL},
- {"refresh_token", NULL},
- {"scope", "openid offline_access profile https://outlook.office.com/mail.readwrite https://outlook.office.com/mail.readwrite.shared https://outlook.office.com/mail.send https://outlook.office.com/mail.send.shared https://outlook.office.com/calendars.readwrite https://outlook.office.com/calendars.readwrite.shared https://outlook.office.com/contacts.readwrite https://outlook.office.com/contacts.readwrite.shared https://outlook.office.com/tasks.readwrite https://outlook.office.com/tasks.readwrite.shared https://outlook.office.com/mailboxsettings.readwrite https://outlook.office.com/people.read https://outlook.office.com/user.readbasic.all"},
- {"redirect_uri", "https://login.microsoftonline.com/common/oauth2/nativeclient"},
- {"grant_type", "authorization_code"},
- {"grant_type", "refresh_token"},
- {"response_type", "code"},
- {"state", NULL},
- {"prompt", "login"}
- },
- {{"GET", "https://login.microsoftonline.com/common/oauth2/authorize",
- {OA2_Id, OA2_Scope, OA2_Redirect, OA2_Response, OA2_State, OA2_Prompt, OA2_End}},
- {"POST", "https://login.microsoftonline.com/common/oauth2/token",
- {OA2_Id, OA2_Secret, OA2_Redirect, OA2_GrantTypeforAccessToken, OA2_Code, OA2_Scope, OA2_End}},
- {"POST", "https://login.microsoftonline.com/common/oauth2/token",
- {OA2_Id, OA2_Secret, OA2_RefreshToken, OA2_GrantTypefromRefreshToken, OA2_End, OA2_End, OA2_End}}
- },
- NULL, 0
- },
-#endif
- { NULL, NULL, NULL, NULL, NULL, 0},
-};
+typedef struct xoauth_default_s {
+ unsigned char *name;
+ char *client_id;
+ char *client_secret;
+} XOAUTH2_INFO_S;
+
+#define GMAIL_NAME "Gmail"
+#define GMAIL_ID "624395471329-0qee3goofj7kbl7hsukou3rqq0igntv1.apps.googleusercontent.com"
+#define GMAIL_SECRET "vwnqVJQrJZpR6JilCfAN5nY7"
+
+#define OUTLOOK_NAME "Outlook"
+#define OUTLOOK_ID "c8df0dbf-4750-4bb9-98e9-562b10caa26a"
+#define OUTLOOK_SECRET "ijrmPVDYP4yxbNL3442;!!_"
+
#endif /* ALPINE_XOAUTH2_INCLUDED */
diff --git a/alpine/xoauth2conf.c b/alpine/xoauth2conf.c
new file mode 100644
index 00000000..3509ef6e
--- /dev/null
+++ b/alpine/xoauth2conf.c
@@ -0,0 +1,399 @@
+/*
+ * ========================================================================
+ * Copyright 2006-2008 University of Washington
+ * Copyright 2013-2020 Eduardo Chappa
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ========================================================================
+ */
+
+#include "headers.h"
+#include "xoauth2conf.h"
+#include "xoauth2.h"
+#include "keymenu.h"
+#include "status.h"
+#include "confscroll.h"
+#include "../pith/state.h"
+#include "../pith/conf.h"
+#include "../pith/list.h"
+
+extern OAUTH2_S alpine_oauth2_list[];
+
+XOAUTH2_INFO_S xoauth_default[] = {
+ { GMAIL_NAME, GMAIL_ID, GMAIL_SECRET},
+#if 0
+ { OUTLOOK_NAME, OUTLOOK_ID, OUTLOOK_SECRET},
+#endif
+ { NULL, NULL, NULL}
+};
+
+
+#define NXSERVERS (sizeof(xoauth_default)/sizeof(xoauth_default[0])-1)
+#define XOAUTH2_CLIENT_ID _("Client-Id")
+#define XOAUTH2_CLIENT_SECRET _("Client-Secret")
+#define XNAME "/NAME="
+#define XID "/ID="
+#define XSECRET "/SECRET="
+
+void write_xoauth_configuration(struct variable *, struct variable **, EditWhich);
+
+char *
+xoauth_config_line(char *server, char *id, char *secret)
+{
+ size_t n;
+ char *rv;
+
+ n = strlen(XNAME) + strlen(XID) + strlen(XSECRET)
+ + strlen(server) + strlen(id) + strlen(secret) + 9;
+ rv = fs_get(n*sizeof(char));
+ sprintf(rv, "%s\"%s\" %s\"%s\" %s\"%s\"", XNAME, server, XID, id,
+ XSECRET, secret);
+ return rv;
+}
+
+/* call this function when id and secret are unknown.
+ * precedence is as follows:
+ * If the user has configured something, return that;
+ * else if we are already using a value, return that;
+ * else return default values.
+ */
+void
+oauth2_get_client_info(char *name, char **id, char **secret)
+{
+ int i;
+ char **lval, *name_lval, *idp, *secretp;
+
+ *id = *secret = NULL;
+
+ /* first check the value configured by the user */
+ lval = ps_global->vars[V_XOAUTH2_INFO].current_val.l;
+ for(i = 0; lval && lval[i]; i++){
+ xoauth_parse_client_info(lval[i], &name_lval, &idp, &secretp);
+ if(name_lval && !strcmp(name_lval, name)){
+ *id = idp ? cpystr(idp) : NULL;
+ *secret = secretp ? cpystr(secretp) : NULL;
+ }
+ if(name_lval) fs_give((void **) &name_lval);
+ if(idp) fs_give((void **) &idp);
+ if(secretp) fs_give((void **) &secretp);
+ break;
+ }
+
+ if(*id && **id && *secret && **secret) return;
+
+ /* if not, now see if we already have a value set, and use that */
+ for(i = 0; alpine_oauth2_list[i].name != NULL; i++){
+ if(!strcmp(alpine_oauth2_list[i].name, name)){
+ *id = alpine_oauth2_list[i].param[OA2_Id].value
+ ? cpystr(alpine_oauth2_list[i].param[OA2_Id].value) : NULL;
+ *secret = alpine_oauth2_list[i].param[OA2_Secret].value
+ ? cpystr(alpine_oauth2_list[i].param[OA2_Secret].value) : NULL;
+ break;
+ }
+ }
+
+ if(*id && **id && *secret && **secret) return;
+
+ /* if nothing, use the default value */
+ for(i = 0; xoauth_default[i].name != NULL; i++)
+ if(!strcmp(xoauth_default[i].name, name)){
+ *id = cpystr(xoauth_default[i].client_id);
+ *secret = cpystr(xoauth_default[i].client_secret);
+ break;
+ }
+}
+
+/* write vlist to v
+ * Each vlist member is of type "p", while "v" is of type "l", so we
+ * each entry in "l" by using each of the "p" entries.
+ */
+void
+write_xoauth_configuration(struct variable *v, struct variable **vlist, EditWhich ew)
+{
+ int i, j, k;
+ size_t n;
+ char ***alval, **lval, *p, *q, *l;
+
+ alval = ALVAL(v, ew);
+ for (i = 0, k = 0; vlist[i] != NULL;){
+ if(PVAL(vlist[i], ew)){
+ j = i/2; /* this is the location in the alpine_oauth2_list array */
+ i = 2*j; /* reset i */
+ p = PVAL(vlist[i], ew);
+ if(p == NULL) p = vlist[i]->current_val.p;
+ q = PVAL(vlist[i+1], ew);
+ if(q == NULL) q = vlist[i+1]->current_val.p;
+ if(k == 0) lval = fs_get((NXSERVERS +1)*sizeof(char *));
+ lval[k++] = xoauth_config_line(alpine_oauth2_list[j].name, p, q);
+ if(alpine_oauth2_list[j].param[OA2_Id].value)
+ fs_give((void **) &alpine_oauth2_list[j].param[OA2_Id].value);
+ if(alpine_oauth2_list[j].param[OA2_Secret].value)
+ fs_give((void **) &alpine_oauth2_list[j].param[OA2_Secret].value);
+ alpine_oauth2_list[j].param[OA2_Id].value = cpystr(p);
+ alpine_oauth2_list[j].param[OA2_Secret].value = cpystr(q);
+ i += 2;
+ }
+ else i++;
+ }
+ if(k > 0){
+ lval[k] = NULL;
+ if(*alval) free_list_array(alval);
+ *alval = lval;
+ }
+ else
+ *alval = NULL;
+ set_current_val(&ps_global->vars[V_XOAUTH2_INFO], FALSE, FALSE);
+}
+
+
+/* parse line of the form
+ /NAME="text" /ID="text" /SECRET="text"
+ */
+void
+xoauth_parse_client_info(char *lvalp, char **namep, char **idp, char **secretp)
+{
+ char *s, *t, c;
+ *namep = *idp = *secretp = NULL;
+
+ if (lvalp == NULL) return;
+
+ if(s = strstr(lvalp, XNAME)){
+ s += strlen(XNAME);
+ if(*s == '"') s++;
+ for(t = s; *t && *t != '"' && *t != ' '; t++);
+ c = *t;
+ *t = '\0';
+ *namep = cpystr(s);
+ *t = c;
+ }
+
+ if(s = strstr(lvalp, XID)){
+ s += strlen(XID);
+ if(*s == '"') s++;
+ for(t = s; *t && *t != '"' && *t != ' '; t++);
+ c = *t;
+ *t = '\0';
+ *idp = cpystr(s);
+ *t = c;
+ }
+
+ if(s = strstr(lvalp, XSECRET)){
+ s += strlen(XSECRET);
+ if(*s == '"') s++;
+ for(t = s; *t && *t != '"' && *t != ' '; t++);
+ c = *t;
+ *t = '\0';
+ *secretp = cpystr(s);
+ *t = c;
+ }
+}
+
+
+/*----------------------------------------------------------------------
+ Screen to add client_id and client_secret for a service
+
+ ---*/
+void
+alpine_xoauth2_configuration(struct pine *ps, int edit_exceptions)
+{
+ struct variable gmail_client_id_var, gmail_client_secret_var;
+#if 0
+ struct variable outlook_client_id_var, outlook_client_secret_var;
+#endif
+ struct variable *varlist[2*NXSERVERS + 1];
+ char tmp[MAXPATH+1], *pval, **lval;
+ char *id, *secret;
+ char *name_lval, *id_lval, *id_conf, *id_def, *secret_lval, *secret_conf, *secret_def;
+ int i, j, k, l, ln = 0, readonly_warning = 0, pos;
+ CONF_S *ctmpa = NULL, *ctmpb, *first_line = NULL;
+ FEATURE_S *feature;
+ PINERC_S *prc = NULL;
+ OPT_SCREEN_S screen;
+ int expose_hidden_config, add_hidden_vars_title = 0;
+ SAVED_CONFIG_S *vsave;
+
+ dprint((3, "-- alpine_xoauth2_configuration --\n"));
+
+ ew = edit_exceptions ? ps_global->ew_for_except_vars : Main;
+
+ if(ps->restricted)
+ readonly_warning = 1;
+ else{
+ switch(ew){
+ case Main:
+ prc = ps->prc;
+ break;
+ case Post:
+ prc = ps->post_prc;
+ break;
+ default:
+ break;
+ }
+
+ readonly_warning = prc ? prc->readonly : 1;
+ }
+
+ ps->next_screen = SCREEN_FUN_NULL;
+
+ mailcap_free(); /* free resources we won't be using for a while */
+
+ varlist[0] = &gmail_client_id_var;
+ varlist[1] = &gmail_client_secret_var;
+#if 0
+ varlist[2] = &outlook_client_id_var;
+ varlist[3] = &outlook_client_secret_var;
+#endif
+ varlist[2*NXSERVERS] = NULL;
+
+ for(i = 0; i < 2*NXSERVERS; i++)
+ memset((void *) varlist[i], 0, sizeof(struct variable));
+
+ pos = -1;
+ do {
+ ctmpa = first_line = NULL;
+
+ ln = strlen(XOAUTH2_CLIENT_ID);
+ i = strlen(XOAUTH2_CLIENT_SECRET);
+ if(ln < i) ln = i;
+
+ lval = LVAL(&ps->vars[V_XOAUTH2_INFO], ew);
+
+ for(i = 0, l = 0; alpine_oauth2_list[i].name != NULL; i++){
+ id_conf = id_def = secret_conf = secret_def = NULL;
+ name_lval = id_lval = secret_lval = NULL;
+
+ id_conf = alpine_oauth2_list[i].param[OA2_Id].value;
+ secret_conf = alpine_oauth2_list[i].param[OA2_Secret].value;
+
+ for(j = 0; xoauth_default[j].name != NULL; j++)
+ if(!strcmp(alpine_oauth2_list[i].name, xoauth_default[j].name))
+ break;
+
+ if(xoauth_default[j].name != NULL){
+ id_def = xoauth_default[j].client_id;
+ secret_def = xoauth_default[j].client_secret;
+ }
+
+ /* fix this: the purpose is to search for the name in lval */
+ for(k = 0; lval && lval[k]; k++){
+ xoauth_parse_client_info(lval[k], &name_lval, &id_lval, &secret_lval);
+ if(name_lval && !strcmp(name_lval, alpine_oauth2_list[i].name))
+ break;
+ if (name_lval) fs_give((void **) &name_lval);
+ if (id_lval) fs_give((void **) &id_lval);
+ if (secret_lval) fs_give((void **) &secret_lval);
+ }
+
+ /* Here we have three values. The one being used by c-client in
+ * id_conf, secret_conf. The default value in Alpine, obtained
+ * by the programmer by registering Alpine, and the value
+ * configured in Alpine by the user in id_lval, and secret_lval.
+ *
+ * The rules are:
+ * 1. If id_lval && secret_lval are not null, we use those.
+ * 2. else we use the default values.
+ */
+ id = id_lval ? id_lval : id_def;
+ secret = secret_lval ? secret_lval : secret_def;
+
+ new_confline(&ctmpa)->var = NULL;
+ if(!first_line) first_line = ctmpa;
+
+ /* Write Name of provider first */
+ ctmpa->flags |= CF_NOSELECT;
+ ctmpa->help = NO_HELP;
+ ctmpa->valoffset = 1;
+ ctmpa->value = cpystr(alpine_oauth2_list[i].name);
+
+ /* Setup client-id variable */
+ varlist[l]->name = cpystr(XOAUTH2_CLIENT_ID);
+ varlist[l]->is_used = 1;
+ varlist[l]->is_user = 1;
+ varlist[l]->main_user_val.p = strcmp(id, id_def)? cpystr(id) : NULL;
+ varlist[l]->global_val.p = cpystr(id_def);
+ set_current_val(varlist[l], FALSE, FALSE);
+
+ /* Write client-id variable */
+ new_confline(&ctmpa)->var = varlist[l];
+ utf8_snprintf(tmp, sizeof(tmp), " %-*.100w =", ln, XOAUTH2_CLIENT_ID);
+ tmp[sizeof(tmp)-1] = '\0';
+ ctmpa->varname = cpystr(tmp);
+ ctmpa->varmem = l++;
+ ctmpa->valoffset = ln + 3 + 3;
+ ctmpa->value = pretty_value(ps, ctmpa);
+ ctmpa->keymenu = &config_text_keymenu;
+ ctmpa->help = h_config_xoauth2_client_id;
+ ctmpa->tool = text_tool;
+ ctmpa->varnamep = ctmpb;
+
+ /* Set up client-secret variable */
+ varlist[l]->name = cpystr(XOAUTH2_CLIENT_SECRET);
+ varlist[l]->is_used = 1;
+ varlist[l]->is_user = 1;
+ varlist[l]->main_user_val.p = strcmp(secret, secret_def) ? cpystr(secret) : NULL;
+ varlist[l]->global_val.p = cpystr(secret_def);
+ set_current_val(varlist[l], FALSE, FALSE);
+
+ /* Write client-secret variable */
+ new_confline(&ctmpa)->var = varlist[l];
+ utf8_snprintf(tmp, sizeof(tmp), " %-*.100w =", ln, XOAUTH2_CLIENT_SECRET);
+ tmp[sizeof(tmp)-1] = '\0';
+ ctmpa->varname = cpystr(tmp);
+ ctmpa->varmem = l++;
+ ctmpa->valoffset = ln + 3 + 3;
+ ctmpa->value = pretty_value(ps, ctmpa);
+ ctmpa->keymenu = &config_text_keymenu;
+ ctmpa->help = h_config_xoauth2_client_secret;
+ ctmpa->tool = text_tool;
+ ctmpa->varnamep = ctmpb;
+
+ /* Separate servers with a blank line */
+ new_confline(&ctmpa);
+ ctmpa->flags |= CF_NOSELECT | CF_B_LINE;
+
+ /* clean up the house */
+ if(id_lval) fs_give((void **) &id_lval);
+ if(secret_lval) fs_give((void **) &secret_lval);
+ if(name_lval) fs_give((void **) &name_lval);
+ }
+
+ vsave = save_config_vars(ps, expose_hidden_config);
+ first_line = pos < 0 ? first_sel_confline(first_line) : set_confline_number(first_line, pos);
+ pos = -1;
+ memset(&screen, 0, sizeof(screen));
+ screen.ro_warning = readonly_warning;
+ /* TRANSLATORS: Print something1 using something2.
+ "configuration" is something1 */
+ switch(conf_scroll_screen(ps, &screen, first_line, "XOAUTH2 Alpine Info",
+ _("configuration"), 0, &pos)){
+ case 0:
+ break;
+
+ case 1:
+ write_xoauth_configuration(&ps->vars[V_XOAUTH2_INFO], varlist, ew);
+ write_pinerc(ps, ew, WRP_NONE);
+ break;
+
+ case 10:
+ revert_to_saved_config(ps, vsave, expose_hidden_config);
+ if(prc)
+ prc->outstanding_pinerc_changes = 0;
+ break;
+
+ default:
+ q_status_message(SM_ORDER,7,10,
+ "conf_scroll_screen bad ret, not supposed to happen");
+ break;
+ }
+ } while (pos >= 0);
+
+#ifdef _WINDOWS
+ mswin_set_quit_confirm (F_OFF(F_QUIT_WO_CONFIRM, ps_global));
+#endif
+}
+
diff --git a/alpine/xoauth2conf.h b/alpine/xoauth2conf.h
new file mode 100644
index 00000000..15afadc7
--- /dev/null
+++ b/alpine/xoauth2conf.h
@@ -0,0 +1,27 @@
+/*
+ * ========================================================================
+ * Copyright 2006-2007 University of Washington
+ * Copyright 2013-2020 Eduardo Chappa
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ========================================================================
+ */
+
+#ifndef XOAUTH2_CONFIG
+#define XOAUTH2_CONFIG
+
+#include "confscroll.h"
+#include "../pith/state.h"
+
+/* exported protoypes */
+void alpine_xoauth2_configuration(struct pine *, int);
+void xoauth_parse_client_info(char *, char **, char **, char **);
+void oauth2_get_client_info(char *, char **, char **);
+char *xoauth_config_line(char *, char *, char *);
+
+#endif /* XOAUTH2_CONFIG */
diff --git a/imap/src/c-client/auth_oa2.c b/imap/src/c-client/auth_oa2.c
index 907f722f..7ac1cb23 100644
--- a/imap/src/c-client/auth_oa2.c
+++ b/imap/src/c-client/auth_oa2.c
@@ -228,15 +228,17 @@ mm_login_oauth2_c_client_method (NETMBX *mb, char *user,
char *s = NULL;
JSON_S *json = NULL;
- if(oauth2->param[OA2_Id].value == NULL
- || oauth2->param[OA2_Secret].value == NULL){
- /*
- * We need to implement client-side entering client_id and
- * client_secret, and other parameters. In the mean time, bail out.
- */
- return;
+ if(oauth2->param[OA2_Id].value == NULL || oauth2->param[OA2_Secret].value == NULL){
+ oauth2clientinfo_t ogci =
+ (oauth2clientinfo_t) mail_parameters (NIL, GET_OA2CLIENTINFO, NIL);
+
+ if(ogci) (*ogci)(oauth2->name, &oauth2->param[OA2_Id].value,
+ &oauth2->param[OA2_Secret].value);
}
+ if(oauth2->param[OA2_Id].value == NULL || oauth2->param[OA2_Secret].value == NULL)
+ return;
+
/* first check if we have a refresh token, and in that case use it */
if(oauth2->param[OA2_RefreshToken].value){
diff --git a/imap/src/c-client/mail.c b/imap/src/c-client/mail.c
index 7291a642..adddb9d4 100644
--- a/imap/src/c-client/mail.c
+++ b/imap/src/c-client/mail.c
@@ -91,6 +91,8 @@ static copyuid_t mailcopyuid = NIL;
static appenduid_t mailappenduid = NIL;
static oauth2getaccesscode_t oauth2getaccesscode = NIL;
+
+static oauth2clientinfo_t oauth2clientinfo = NIL;
/* free elt extra stuff callback */
static freeeltsparep_t mailfreeeltsparep = NIL;
/* free envelope extra stuff callback */
@@ -673,6 +675,11 @@ void *mail_parameters (MAILSTREAM *stream,long function,void *value)
case GET_OA2CLIENTGETACCESSCODE:
ret = (void *) oauth2getaccesscode;
break;
+ case SET_OA2CLIENTINFO:
+ oauth2clientinfo = (oauth2clientinfo_t) value;
+ case GET_OA2CLIENTINFO:
+ ret = (void *) oauth2clientinfo;
+ break;
default:
if ((r = smtp_parameters (function,value)) != NULL) ret = r;
if ((r = env_parameters (function,value)) != NULL) ret = r;
diff --git a/imap/src/c-client/mail.h b/imap/src/c-client/mail.h
index b5cd65d2..4cb35133 100644
--- a/imap/src/c-client/mail.h
+++ b/imap/src/c-client/mail.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2018 Eduardo Chappa
+ * Copyright 2016-2020 Eduardo Chappa
*
* Last Edited: July 21, 2018 Eduardo Chappa <chappa@washington.edu>
*
@@ -156,6 +156,8 @@
#define SET_IDSTREAM (long) 168
#define GET_OA2CLIENTGETACCESSCODE (long) 169
#define SET_OA2CLIENTGETACCESSCODE (long) 170
+#define GET_OA2CLIENTINFO (long) 171
+#define SET_OA2CLIENTINFO (long) 172
/* 2xx: environment */
#define GET_USERNAME (long) 201
@@ -1939,7 +1941,7 @@ typedef struct OA2_serverparam_s {
} OAUTH2_SERVER_METHOD_S;
typedef struct oauth2_s {
- char *name; /* provider name */
+ unsigned char *name; /* provider name */
char *host[OAUTH2_TOT_EQUIV]; /* servers for which this data applies */
OAUTH2_PARAM_S param[OA2_End]; /* parameters name and values for this server */
/* servers, methods and parameters to retrieve access code and tokens */
@@ -1949,3 +1951,5 @@ typedef struct oauth2_s {
} OAUTH2_S;
typedef char *(*oauth2getaccesscode_t) (char *url, OAUTH2_S *, int *);
+typedef void *(*oauth2clientinfo_t)(char *name, char **id, char **secret);
+
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 49180710..9f803991 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,17 @@
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -78,8 +88,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = m4
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs ChangeLog
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -92,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -116,6 +125,8 @@ am__can_run_installinfo = \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs \
+ ChangeLog
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALPINE_DATESTAMP = @ALPINE_DATESTAMP@
@@ -306,7 +317,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign m4/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign m4/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -481,6 +491,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# 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.
diff --git a/pico/Makefile.in b/pico/Makefile.in
index 24ab1bd1..17249a65 100644
--- a/pico/Makefile.in
+++ b/pico/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,17 @@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -92,8 +102,6 @@ build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = pico$(EXEEXT) pilot$(EXEEXT)
subdir = pico
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -106,6 +114,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -215,6 +224,8 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -444,7 +455,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pico/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign pico/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -559,14 +569,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -861,6 +871,8 @@ uninstall-am: uninstall-binPROGRAMS
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
+.PRECIOUS: Makefile
+
# 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.
diff --git a/pico/osdep/Makefile.in b/pico/osdep/Makefile.in
index c35f9ff5..cf991fa7 100644
--- a/pico/osdep/Makefile.in
+++ b/pico/osdep/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -26,7 +26,17 @@
# ========================================================================
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -90,8 +100,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = pico/osdep
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -104,6 +112,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -187,6 +196,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALPINE_DATESTAMP = @ALPINE_DATESTAMP@
@@ -382,7 +393,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pico/osdep/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign pico/osdep/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -438,14 +448,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -663,6 +673,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# 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.
diff --git a/pith/Makefile.in b/pith/Makefile.in
index 2c25fd1c..93b19562 100644
--- a/pith/Makefile.in
+++ b/pith/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -28,7 +28,17 @@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -93,8 +103,6 @@ build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = help_h_gen$(EXEEXT) help_c_gen$(EXEEXT)
subdir = pith
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -107,6 +115,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -231,6 +240,8 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -461,7 +472,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pith/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign pith/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -587,14 +597,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -891,6 +901,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
help_c_gen$(BUILD_EXEEXT): help_c_gen.c
@rm -f help_c_gen$(BUILD_EXEEXT)
diff --git a/pith/charconv/Makefile.in b/pith/charconv/Makefile.in
index 834036a5..d30496c5 100644
--- a/pith/charconv/Makefile.in
+++ b/pith/charconv/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,17 @@
# ========================================================================
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -91,8 +101,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = pith/charconv
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -105,6 +113,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -183,6 +192,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALPINE_DATESTAMP = @ALPINE_DATESTAMP@
@@ -376,7 +387,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pith/charconv/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign pith/charconv/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -417,14 +427,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -642,6 +652,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# 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.
diff --git a/pith/conf.c b/pith/conf.c
index c802d011..3ce1c8a2 100644
--- a/pith/conf.c
+++ b/pith/conf.c
@@ -271,6 +271,8 @@ CONF_TXT_T cf_text_personal_print_cat[] = "Which category default print command
CONF_TXT_T cf_text_standard_printer[] = "The system wide standard printers";
+CONF_TXT_T cf_text_xoauth2_info[] = "Your client-id and client-secret information to authenticate using XOAUTH2";
+
CONF_TXT_T cf_text_last_time_prune_quest[] = "Set by Alpine; controls beginning-of-month sent-mail pruning.";
CONF_TXT_T cf_text_last_version_used[] = "Set by Alpine; controls display of \"new version\" message.";
@@ -758,6 +760,8 @@ static struct variable variables[] = {
NULL, cf_text_personal_print_command},
{"personal-print-category", 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0,
NULL, cf_text_personal_print_cat},
+{"xoauth2-info", 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
+ "XOAUTH2 Info", cf_text_xoauth2_info},
{"patterns", 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
NULL, cf_text_old_patterns},
{"patterns-roles", 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0,
@@ -2538,6 +2542,8 @@ init_vars(struct pine *ps, void (*cmds_f) (struct pine *, char **))
set_variable(V_SAVE_BY_SENDER, "yes", 1, 1, Main);
obs_save_by_sender = !strucmp(VAR_SAVE_BY_SENDER, "yes");
+ set_current_val(&vars[V_XOAUTH2_INFO], TRUE, TRUE);
+
set_current_pattern_vals(ps);
set_current_val(&vars[V_INDEX_FORMAT], TRUE, TRUE);
diff --git a/pith/conftype.h b/pith/conftype.h
index 0e782e62..7a67fab8 100644
--- a/pith/conftype.h
+++ b/pith/conftype.h
@@ -178,6 +178,7 @@ typedef enum { V_PERSONAL_NAME = 0
, V_PRINTER
, V_PERSONAL_PRINT_COMMAND
, V_PERSONAL_PRINT_CATEGORY
+ , V_XOAUTH2_INFO
, V_PATTERNS /* obsolete */
, V_PAT_ROLES
, V_PAT_FILTS
diff --git a/pith/osdep/Makefile.in b/pith/osdep/Makefile.in
index 2a2f3046..cce307bc 100644
--- a/pith/osdep/Makefile.in
+++ b/pith/osdep/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,17 @@
# ========================================================================
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -91,8 +101,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = pith/osdep
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -105,6 +113,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -190,6 +199,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALPINE_DATESTAMP = @ALPINE_DATESTAMP@
@@ -387,7 +398,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pith/osdep/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign pith/osdep/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -448,14 +458,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -673,6 +683,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# 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.
diff --git a/pith/pine.hlp b/pith/pine.hlp
index a5241cdf..05b4f308 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 384 2020-01-10 10:32:45
+Alpine Commit 385 2020-01-15 12:40:59
============= h_news =================
<HTML>
<HEAD>
@@ -15933,6 +15933,66 @@ Nickname: field.
&lt;End of help on this topic&gt;
</BODY>
</HTML>
+======= h_config_xoauth2_client_id =======
+<HTML>
+<HEAD>
+<TITLE>Client-Id Explained</TITLE>
+</HEAD>
+<BODY>
+<H1>Client-Id Explained</H1>
+
+If you have registered Alpine with your service provider to use the
+XOAUTH2 authenticator, or someone has shared a client-id with you, use this
+field to input this field. Remember that in order to use the XOAUTH2 authentication
+method, you must have a pair of client-id and client-secret. You must have
+both in order for this authenticator to work.
+
+<P>
+The Client-Id field is a string that your provider generates for the program
+being registered. However, some providers allow different users to register
+the same program. Users of the Mutt email program already do this to use
+XOAUTH2 authentication in Gmail.
+
+<P>
+Some providers generate an extremely long client-id string. If this is your
+case, you might have to divide that string into pieces and paste each of those
+pieces into this field.
+<P>
+&lt;End of help on this topic&gt;
+</BODY>
+</HTML>
+======= h_config_xoauth2_client_secret =======
+<HTML>
+<HEAD>
+<TITLE>Client-Secret Explained</TITLE>
+</HEAD>
+<BODY>
+<H1>Client-Secret Explained</H1>
+
+If you have registered Alpine with your service provider to use the
+XOAUTH2 authenticator, or someone has shared a client-secret with you, use this
+field to input this field. Remember that in order to use the XOAUTH2 authentication
+method, you must have a pair of client-id and client-secret. You must have
+both in order for this authenticator to work.
+
+<P> The client-secret field is supposed to be kept secret, that is not
+shared with any of the users, but due to the open source nature of Alpine,
+it is not possible to keep it secret in any meaningful way. The intention
+of this field is so that only the coders of an app can use the codes given
+to them and authenticate their users to the services they are requesting.
+This means that other coders would not be able to impresonate that app,
+and use it to steal data from those users. In the case of Alpine this is
+not possible, as Alpine does not steal data from its users, so users are safe
+sharing client-secrets. Just make sure you obtain your copy of Alpine from
+a reputable provider or compile the source code by yourself. The official
+source code of this project is located at
+
+<P><CENTER><A HREF="http://repo.or.cz/alpine.git">http://repo.or.cz/alpine.git</A>.</CENTER>
+
+<P>
+&lt;End of help on this topic&gt;
+</BODY>
+</HTML>
======= h_config_role_nick =======
<HTML>
<HEAD>
diff --git a/web/src/Makefile.in b/web/src/Makefile.in
index 3dd88e35..b49e7766 100644
--- a/web/src/Makefile.in
+++ b/web/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -25,7 +25,17 @@
#
# ========================================================================
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -89,8 +99,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = web/src
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -103,6 +111,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -127,6 +136,7 @@ am__can_run_installinfo = \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALPINE_DATESTAMP = @ALPINE_DATESTAMP@
@@ -316,7 +326,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign web/src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign web/src/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -490,6 +499,8 @@ uninstall-am:
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
all:
cd @abs_top_srcdir@/web/src/cgi.tcl-1.10 && ./configure --prefix=@abs_top_srcdir@/web/lib
diff --git a/web/src/alpined.d/Makefile.in b/web/src/alpined.d/Makefile.in
index 9238bb02..0d37d453 100644
--- a/web/src/alpined.d/Makefile.in
+++ b/web/src/alpined.d/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,17 @@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -92,8 +102,6 @@ build_triplet = @build@
host_triplet = @host@
locbin_PROGRAMS = alpined$(EXEEXT) alpineldap$(EXEEXT)
subdir = web/src/alpined.d
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -106,6 +114,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -229,6 +238,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALPINE_DATESTAMP = @ALPINE_DATESTAMP@
@@ -446,7 +457,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign web/src/alpined.d/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign web/src/alpined.d/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -584,14 +594,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -815,6 +825,8 @@ uninstall-am: uninstall-locbinPROGRAMS uninstall-loclibLTLIBRARIES
tags tags-am uninstall uninstall-am uninstall-locbinPROGRAMS \
uninstall-loclibLTLIBRARIES
+.PRECIOUS: Makefile
+
local.c: alpineldap.c color.c imap.c ldap.c remote.c signal.c \
debug.c status.c stubs.c alpined.h color.h ldap.h
diff --git a/web/src/pubcookie/Makefile.in b/web/src/pubcookie/Makefile.in
index 2c685652..77c0f4a4 100644
--- a/web/src/pubcookie/Makefile.in
+++ b/web/src/pubcookie/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -27,7 +27,17 @@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -93,9 +103,6 @@ host_triplet = @host@
bin_PROGRAMS = wp_uidmapper$(EXEEXT) wp_tclsh$(EXEEXT) \
wp_gssapi_proxy$(EXEEXT) wp_umc$(EXEEXT)
subdir = web/src/pubcookie
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp INSTALL \
- README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -108,6 +115,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES =
@@ -203,6 +211,8 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+ $(top_srcdir)/mkinstalldirs INSTALL README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALPINE_DATESTAMP = @ALPINE_DATESTAMP@
@@ -405,7 +415,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign web/src/pubcookie/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign web/src/pubcookie/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -516,14 +525,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -745,6 +754,8 @@ uninstall-am: uninstall-binPROGRAMS
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
+.PRECIOUS: Makefile
+
# 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.