diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-18 11:18:25 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-18 11:18:25 +0900 |
commit | 0f4ff91467f9cd2b14f460297d0e7dcb84f80840 (patch) | |
tree | 2b10b3dc2b0eef1aac6880096423fa575e771eca | |
parent | bb0ada3bddfeeb4e98d3415c37266061c865005f (diff) | |
download | ecryptfs-utils-0f4ff91467f9cd2b14f460297d0e7dcb84f80840.tar.gz ecryptfs-utils-0f4ff91467f9cd2b14f460297d0e7dcb84f80840.tar.bz2 ecryptfs-utils-0f4ff91467f9cd2b14f460297d0e7dcb84f80840.zip |
Imported Upstream version 105upstream/105
53 files changed, 1871 insertions, 986 deletions
diff --git a/Makefile.in b/Makefile.in index d23fa2d..ff4a030 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -94,13 +94,13 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(dist_doc_DATA) AUTHORS COPYING \ ChangeLog INSTALL NEWS README THANKS compile config.guess \ - config.sub depcomp install-sh missing py-compile ltmain.sh + config.sub install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -497,8 +497,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -730,10 +730,16 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives 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 + @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 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -775,9 +781,10 @@ distcheck: dist && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.13.3 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. @@ -456,8 +456,223 @@ sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) + +dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) +# serial 42 IT_PROG_INTLTOOL +AC_DEFUN([IT_PROG_INTLTOOL], [ +AC_PREREQ([2.50])dnl +AC_REQUIRE([AM_NLS])dnl + +case "$am__api_version" in + 1.[01234]) + AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) + ;; + *) + ;; +esac + +INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` +INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` +INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` +if test -n "$1"; then + AC_MSG_CHECKING([for intltool >= $1]) + AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) + test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || + AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) +fi + +AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) +AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) +AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then + AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) +fi + +if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 +fi +AC_SUBST([AM_DEFAULT_VERBOSITY]) + +INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' +INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' +INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;' +AC_SUBST(INTLTOOL_V_MERGE) +AC_SUBST(INTLTOOL__v_MERGE_) +AC_SUBST(INTLTOOL__v_MERGE_0) + +INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' +intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' +intltool__v_merge_options_0='-q' +AC_SUBST(INTLTOOL_V_MERGE_OPTIONS) +AC_SUBST(intltool__v_merge_options_) +AC_SUBST(intltool__v_merge_options_0) + + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@' + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' +if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@' +else + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir' +fi + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' + +_IT_SUBST(INTLTOOL_DESKTOP_RULE) +_IT_SUBST(INTLTOOL_DIRECTORY_RULE) +_IT_SUBST(INTLTOOL_KEYS_RULE) +_IT_SUBST(INTLTOOL_PROP_RULE) +_IT_SUBST(INTLTOOL_OAF_RULE) +_IT_SUBST(INTLTOOL_PONG_RULE) +_IT_SUBST(INTLTOOL_SERVER_RULE) +_IT_SUBST(INTLTOOL_SHEET_RULE) +_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) +_IT_SUBST(INTLTOOL_UI_RULE) +_IT_SUBST(INTLTOOL_XAM_RULE) +_IT_SUBST(INTLTOOL_KBD_RULE) +_IT_SUBST(INTLTOOL_XML_RULE) +_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) +_IT_SUBST(INTLTOOL_CAVES_RULE) +_IT_SUBST(INTLTOOL_SCHEMAS_RULE) +_IT_SUBST(INTLTOOL_THEME_RULE) +_IT_SUBST(INTLTOOL_SERVICE_RULE) +_IT_SUBST(INTLTOOL_POLICY_RULE) + +# Check the gettext tools to make sure they are GNU +AC_PATH_PROG(XGETTEXT, xgettext) +AC_PATH_PROG(MSGMERGE, msgmerge) +AC_PATH_PROG(MSGFMT, msgfmt) +AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) +if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) +fi +xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" +mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" +mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" +if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) +fi + +AC_PATH_PROG(INTLTOOL_PERL, perl) +if test -z "$INTLTOOL_PERL"; then + AC_MSG_ERROR([perl not found]) +fi +AC_MSG_CHECKING([for perl >= 5.8.1]) +$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 +if test $? -ne 0; then + AC_MSG_ERROR([perl 5.8.1 is required for intltool]) +else + IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` + AC_MSG_RESULT([$IT_PERL_VERSION]) +fi +if test "x$2" != "xno-xml"; then + AC_MSG_CHECKING([for XML::Parser]) + if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then + AC_MSG_RESULT([ok]) + else + AC_MSG_ERROR([XML::Parser perl module is required for intltool]) + fi +fi + +# Substitute ALL_LINGUAS so we can use it in po/Makefile +AC_SUBST(ALL_LINGUAS) + +# Set DATADIRNAME correctly if it is not set yet +# (copied from glib-gettext.m4) +if test -z "$DATADIRNAME"; then + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], + [[extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr]])], + [DATADIRNAME=share], + [case $host in + *-*-solaris*) + dnl On Solaris, if bind_textdomain_codeset is in libc, + dnl GNU format message catalog is always supported, + dnl since both are added to the libc all together. + dnl Hence, we'd like to go with DATADIRNAME=share + dnl in this case. + AC_CHECK_FUNC(bind_textdomain_codeset, + [DATADIRNAME=share], [DATADIRNAME=lib]) + ;; + *) + [DATADIRNAME=lib] + ;; + esac]) +fi +AC_SUBST(DATADIRNAME) + +IT_PO_SUBDIR([po]) + +]) + + +# IT_PO_SUBDIR(DIRNAME) +# --------------------- +# All po subdirs have to be declared with this macro; the subdir "po" is +# declared by IT_PROG_INTLTOOL. +# +AC_DEFUN([IT_PO_SUBDIR], +[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. +dnl +dnl The following CONFIG_COMMANDS should be executed at the very end +dnl of config.status. +AC_CONFIG_COMMANDS_PRE([ + AC_CONFIG_COMMANDS([$1/stamp-it], [ + if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then + AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) + fi + rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" + >"$1/stamp-it.tmp" + [sed '/^#/d + s/^[[].*] *// + /^[ ]*$/d + '"s|^| $ac_top_srcdir/|" \ + "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" + ] + [sed '/^POTFILES =/,/[^\\]$/ { + /^POTFILES =/!d + r $1/POTFILES + } + ' "$1/Makefile.in" >"$1/Makefile"] + rm -f "$1/Makefile.tmp" + mv "$1/stamp-it.tmp" "$1/stamp-it" + ]) +])dnl +]) + +# _IT_SUBST(VARIABLE) +# ------------------- +# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST +# +AC_DEFUN([_IT_SUBST], +[ +AC_SUBST([$1]) +m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) +] +) + +# deprecated macros +AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) +# A hint is needed for aclocal from Automake <= 1.9.4: +# AC_DEFUN([AC_PROG_INTLTOOL], ...) + + # nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -649,6 +864,61 @@ else fi[]dnl ])# PKG_CHECK_MODULES + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR + # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -661,10 +931,10 @@ fi[]dnl # 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.14' 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.3], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -680,7 +950,7 @@ 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.3])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -1047,6 +1317,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]) # ----------------------------------------------- @@ -1155,6 +1431,48 @@ 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 Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -1163,7 +1481,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. @@ -1275,38 +1592,6 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999-2013 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. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != 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 -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. @@ -1383,6 +1668,53 @@ AC_DEFUN([_AM_IF_OPTION], # 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) 1999-2013 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_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- @@ -1952,7 +2284,6 @@ AC_SUBST([am__untar]) m4_include([m4/ac_pkg_swig.m4]) m4_include([m4/ac_python_devel.m4]) -m4_include([m4/intltool.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) diff --git a/config.guess b/config.guess index b79252d..1f5c50c 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2013-06-10' +timestamp='2014-03-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -149,7 +149,7 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac @@ -826,7 +826,7 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -969,10 +969,10 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} exit ;; - or32:Linux:*:*) + or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) @@ -1260,16 +1260,26 @@ EOF if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; @@ -1361,154 +1371,6 @@ EOF exit ;; esac -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <<EOF $0: unable to guess system type diff --git a/config.h.in b/config.h.in index 059311a..1f068fe 100644 --- a/config.h.in +++ b/config.h.in @@ -61,9 +61,6 @@ */ #undef LT_OBJDIR -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Name of package */ #undef PACKAGE @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2013-08-10' +timestamp='2014-09-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -265,6 +265,7 @@ case $basic_machine in | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ @@ -282,8 +283,10 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ @@ -295,11 +298,11 @@ case $basic_machine in | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or1k | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -324,7 +327,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -381,6 +384,7 @@ case $basic_machine in | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -400,8 +404,10 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -413,6 +419,7 @@ case $basic_machine in | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -822,6 +829,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -1367,14 +1378,14 @@ case $os in | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1592,9 +1603,6 @@ case $basic_machine in mips*-*) os=-elf ;; - or1k-*) - os=-elf - ;; or32-*) os=-coff ;; @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ecryptfs-utils 104. +# Generated by GNU Autoconf 2.69 for ecryptfs-utils 105. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ecryptfs-utils' PACKAGE_TARNAME='ecryptfs-utils' -PACKAGE_VERSION='104' -PACKAGE_STRING='ecryptfs-utils 104' +PACKAGE_VERSION='105' +PACKAGE_STRING='ecryptfs-utils 105' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1472,7 +1472,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ecryptfs-utils 104 to adapt to many kinds of systems. +\`configure' configures ecryptfs-utils 105 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1543,7 +1543,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ecryptfs-utils 104:";; + short | recursive ) echo "Configuration of ecryptfs-utils 105:";; esac cat <<\_ACEOF @@ -1696,7 +1696,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ecryptfs-utils configure 104 +ecryptfs-utils configure 105 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2061,7 +2061,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ecryptfs-utils $as_me 104, which was +It was created by ecryptfs-utils $as_me 105, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2548,7 +2548,7 @@ test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- -am__api_version='1.13' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3086,6 +3086,48 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' +# 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 + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + ac_config_headers="$ac_config_headers config.h" @@ -4160,6 +4202,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # 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 { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && 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 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +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_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -5288,6 +5389,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # 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 { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && 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 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +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_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -5417,131 +5577,6 @@ fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } @@ -7869,7 +7904,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -7894,7 +7929,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -7913,7 +7951,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -12782,7 +12823,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12828,7 +12869,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12852,7 +12893,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12897,7 +12938,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -12921,7 +12962,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -17146,7 +17187,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ecryptfs-utils $as_me 104, which was +This file was extended by ecryptfs-utils $as_me 105, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17212,7 +17253,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ecryptfs-utils config.status 104 +ecryptfs-utils config.status 105 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 813773b..3baca1e 100644 --- a/configure.ac +++ b/configure.ac @@ -10,7 +10,7 @@ AC_PREREQ(2.59) -AC_INIT([ecryptfs-utils],[104]) +AC_INIT([ecryptfs-utils],[105]) AC_CANONICAL_HOST AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}]) diff --git a/doc/Makefile.in b/doc/Makefile.in index 780db99..ebc5352 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -88,9 +88,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -432,9 +432,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile + $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/doc/manpage/Makefile.in b/doc/manpage/Makefile.in index 20ef4f6..8ebccda 100644 --- a/doc/manpage/Makefile.in +++ b/doc/manpage/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -94,9 +94,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -400,9 +400,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/manpage/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/manpage/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/manpage/Makefile + $(AUTOMAKE) --gnu doc/manpage/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/doc/manpage/ecryptfs-setup-private.1 b/doc/manpage/ecryptfs-setup-private.1 index 7d20961..2a4d542 100644 --- a/doc/manpage/ecryptfs-setup-private.1 +++ b/doc/manpage/ecryptfs-setup-private.1 @@ -21,7 +21,7 @@ User to setup, default is current user if omitted System passphrase for USER, used to wrap MOUNTPASS, will interactively prompt if omitted .TP .B \-m, \-\-mountpass MOUNTPASS -Passphrase for mounting the ecryptfs directory, default is 16 bytes from /dev/urandom if omitted +Passphrase for mounting the ecryptfs directory, default is 16 bytes from /dev/random if omitted .TP .B \-b, \-\-bootstrap Bootstrap a new user's entire home directory diff --git a/doc/manpage/ecryptfs.7 b/doc/manpage/ecryptfs.7 index 4f64fe4..ec63fe2 100644 --- a/doc/manpage/ecryptfs.7 +++ b/doc/manpage/ecryptfs.7 @@ -67,7 +67,7 @@ Parameters that apply to individual key modules have the alias for the key modul The actual password is passphrase. Since the password is visible to utilities (like ps under Unix) this form should only be used where security is not important. .TP .B passphrase_passwd_file=(filename) -The password should be specified in a file with passwd=(passphrase). It is highly recommended that the file be stored on a secure medium such as a personal usb key. +The password should be specified in a file with passphrase_passwd_file=(passphrase). It is highly recommended that the file be stored on a secure medium such as a personal usb key. .TP .B passphrase_passwd_fd=(file descriptor) The password is specified through the specified file descriptor. @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.3ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.10ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.3ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1.10ubuntu1" TIMESTAMP="" package_revision=1.3337 diff --git a/m4/intltool.m4 b/m4/intltool.m4 deleted file mode 100644 index 33353ed..0000000 --- a/m4/intltool.m4 +++ /dev/null @@ -1,237 +0,0 @@ -## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- -## Copyright (C) 2001 Eazel, Inc. -## Author: Maciej Stachowiak <mjs@noisehavoc.org> -## Kenneth Christiansen <kenneth@gnu.org> -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## -## As a special exception to the GNU General Public License, if you -## distribute this file as part of a program that contains a -## configuration script generated by Autoconf, you may include it under -## the same distribution terms that you use for the rest of that program. - -dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) -# serial 42 IT_PROG_INTLTOOL -AC_DEFUN([IT_PROG_INTLTOOL], [ -AC_PREREQ([2.50])dnl -AC_REQUIRE([AM_NLS])dnl - -case "$am__api_version" in - 1.[01234]) - AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) - ;; - *) - ;; -esac - -INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` -INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` -INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` -if test -n "$1"; then - AC_MSG_CHECKING([for intltool >= $1]) - AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) - test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || - AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) -fi - -AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) -AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) -AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) -if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then - AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) -fi - -if test -z "$AM_DEFAULT_VERBOSITY"; then - AM_DEFAULT_VERBOSITY=1 -fi -AC_SUBST([AM_DEFAULT_VERBOSITY]) - -INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' -INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' -INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;' -AC_SUBST(INTLTOOL_V_MERGE) -AC_SUBST(INTLTOOL__v_MERGE_) -AC_SUBST(INTLTOOL__v_MERGE_0) - -INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' -intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' -intltool__v_merge_options_0='-q' -AC_SUBST(INTLTOOL_V_MERGE_OPTIONS) -AC_SUBST(intltool__v_merge_options_) -AC_SUBST(intltool__v_merge_options_0) - - INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@' - INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then - INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@' -else - INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir' -fi - INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - -_IT_SUBST(INTLTOOL_DESKTOP_RULE) -_IT_SUBST(INTLTOOL_DIRECTORY_RULE) -_IT_SUBST(INTLTOOL_KEYS_RULE) -_IT_SUBST(INTLTOOL_PROP_RULE) -_IT_SUBST(INTLTOOL_OAF_RULE) -_IT_SUBST(INTLTOOL_PONG_RULE) -_IT_SUBST(INTLTOOL_SERVER_RULE) -_IT_SUBST(INTLTOOL_SHEET_RULE) -_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) -_IT_SUBST(INTLTOOL_UI_RULE) -_IT_SUBST(INTLTOOL_XAM_RULE) -_IT_SUBST(INTLTOOL_KBD_RULE) -_IT_SUBST(INTLTOOL_XML_RULE) -_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) -_IT_SUBST(INTLTOOL_CAVES_RULE) -_IT_SUBST(INTLTOOL_SCHEMAS_RULE) -_IT_SUBST(INTLTOOL_THEME_RULE) -_IT_SUBST(INTLTOOL_SERVICE_RULE) -_IT_SUBST(INTLTOOL_POLICY_RULE) - -# Check the gettext tools to make sure they are GNU -AC_PATH_PROG(XGETTEXT, xgettext) -AC_PATH_PROG(MSGMERGE, msgmerge) -AC_PATH_PROG(MSGFMT, msgfmt) -AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then - AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) -fi -xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" -mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" -mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" -if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then - AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) -fi - -AC_PATH_PROG(INTLTOOL_PERL, perl) -if test -z "$INTLTOOL_PERL"; then - AC_MSG_ERROR([perl not found]) -fi -AC_MSG_CHECKING([for perl >= 5.8.1]) -$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 -if test $? -ne 0; then - AC_MSG_ERROR([perl 5.8.1 is required for intltool]) -else - IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` - AC_MSG_RESULT([$IT_PERL_VERSION]) -fi -if test "x$2" != "xno-xml"; then - AC_MSG_CHECKING([for XML::Parser]) - if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then - AC_MSG_RESULT([ok]) - else - AC_MSG_ERROR([XML::Parser perl module is required for intltool]) - fi -fi - -# Substitute ALL_LINGUAS so we can use it in po/Makefile -AC_SUBST(ALL_LINGUAS) - -# Set DATADIRNAME correctly if it is not set yet -# (copied from glib-gettext.m4) -if test -z "$DATADIRNAME"; then - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[]], - [[extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr]])], - [DATADIRNAME=share], - [case $host in - *-*-solaris*) - dnl On Solaris, if bind_textdomain_codeset is in libc, - dnl GNU format message catalog is always supported, - dnl since both are added to the libc all together. - dnl Hence, we'd like to go with DATADIRNAME=share - dnl in this case. - AC_CHECK_FUNC(bind_textdomain_codeset, - [DATADIRNAME=share], [DATADIRNAME=lib]) - ;; - *) - [DATADIRNAME=lib] - ;; - esac]) -fi -AC_SUBST(DATADIRNAME) - -IT_PO_SUBDIR([po]) - -]) - - -# IT_PO_SUBDIR(DIRNAME) -# --------------------- -# All po subdirs have to be declared with this macro; the subdir "po" is -# declared by IT_PROG_INTLTOOL. -# -AC_DEFUN([IT_PO_SUBDIR], -[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. -dnl -dnl The following CONFIG_COMMANDS should be executed at the very end -dnl of config.status. -AC_CONFIG_COMMANDS_PRE([ - AC_CONFIG_COMMANDS([$1/stamp-it], [ - if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then - AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) - fi - rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" - >"$1/stamp-it.tmp" - [sed '/^#/d - s/^[[].*] *// - /^[ ]*$/d - '"s|^| $ac_top_srcdir/|" \ - "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" - ] - [sed '/^POTFILES =/,/[^\\]$/ { - /^POTFILES =/!d - r $1/POTFILES - } - ' "$1/Makefile.in" >"$1/Makefile"] - rm -f "$1/Makefile.tmp" - mv "$1/stamp-it.tmp" "$1/stamp-it" - ]) -])dnl -]) - -# _IT_SUBST(VARIABLE) -# ------------------- -# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST -# -AC_DEFUN([_IT_SUBST], -[ -AC_SUBST([$1]) -m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) -] -) - -# deprecated macros -AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) -# A hint is needed for aclocal from Automake <= 1.9.4: -# AC_DEFUN([AC_PROG_INTLTOOL], ...) - diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 02b4bbe..d7c043f 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1312,7 +1312,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1333,7 +1333,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1352,7 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. @@ -160,7 +160,7 @@ give_advice () ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff --git a/packaging/ecryptfs-utils.changes b/packaging/ecryptfs-utils.changes deleted file mode 100644 index 681b786..0000000 --- a/packaging/ecryptfs-utils.changes +++ /dev/null @@ -1,3 +0,0 @@ -%changelog -* Fri Mar 14 2014 Jussi Laako <jussi.laako@linux.intel.com> -- Initial RPM packaging diff --git a/packaging/ecryptfs-utils.spec b/packaging/ecryptfs-utils.spec deleted file mode 100644 index a663048..0000000 --- a/packaging/ecryptfs-utils.spec +++ /dev/null @@ -1,112 +0,0 @@ -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} - -Name: ecryptfs-utils -Summary: eCryptfs user space utilities -Version: 104 -Release: 1 -Group: System/Libraries -License: GPL-2.0+ -Source: %{name}_%{version}.orig.tar.gz -URL: http://ecryptfs.org -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig -Requires: keyutils -Requires: libecryptfs = %{version}-%{release} -BuildRequires: intltool -BuildRequires: python-devel -BuildRequires: keyutils-devel -BuildRequires: libopenssl-devel -BuildRequires: nss-devel -BuildRequires: pam-devel - - -%description -%{summary}. - - -%package -n libecryptfs -Summary: eCryptfs runtime library -Group: System/Libraries - -%description -n libecryptfs -%{summary}. - - -%package -n libecryptfs-devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: libecryptfs = %{version}-%{release} -Requires: keyutils-devel - -%description -n libecryptfs-devel -%{summary}. - - -%package -n libecryptfs-python -Summary: Python bindings for %{name} -Group: Development/Libraries -Requires: libecryptfs = %{version}-%{release} - -%description -n libecryptfs-python -%{summary}. - - -%prep -%setup -q -n %{name}-%{version} - - -%build -%configure -make %{?_smp_mflags} - - -%install -rm -rf %{buildroot} -%make_install - - -%post -p /sbin/ldconfig - - -%postun -p /sbin/ldconfig - - -%files -%defattr(-,root,root,-) -%doc AUTHORS COPYING INSTALL NEWS README -%{_bindir}/ecryptfs* -/sbin/mount.ecryptfs* -/sbin/umount.ecryptfs* -%ifarch x86_64 -/lib64/security/pam_ecryptfs.so -%else -/lib/security/pam_ecryptfs.so -%endif -%{_datadir}/locale/*/LC_MESSAGES/ecryptfs-utils.mo -%{_mandir}/man1/*ecryptfs* -%{_mandir}/man7/*ecryptfs* -%{_mandir}/man8/*ecryptfs* -%{_datadir}/doc/%{name}/* -%{_datadir}/ecryptfs-utils/* - - -%files -n libecryptfs -%defattr(-,root,root,-) -%{_libdir}/libecryptfs.so.* -%{_libdir}/ecryptfs/* - - -%files -n libecryptfs-devel -%defattr(-,root,root,-) -%{_includedir}/ecryptfs.h -%{_libdir}/libecryptfs.so -%{_libdir}/pkgconfig/libecryptfs.pc - - -%files -n libecryptfs-python -%defattr(-,root,root,-) -%{python2_sitelib}/ecryptfs-utils/* -%{python2_sitearch}/ecryptfs-utils/* - diff --git a/src/Makefile.in b/src/Makefile.in index 3bccbb7..2dac324 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -93,9 +93,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -400,9 +400,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile + $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/src/daemon/Makefile.in b/src/daemon/Makefile.in index 6c2e199..98f3bca 100644 --- a/src/daemon/Makefile.in +++ b/src/daemon/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -86,9 +86,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -391,9 +391,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/daemon/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/daemon/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/daemon/Makefile + $(AUTOMAKE) --gnu src/daemon/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -479,14 +479,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 $@ $< diff --git a/src/desktop/Makefile.in b/src/desktop/Makefile.in index aa4a668..688478c 100644 --- a/src/desktop/Makefile.in +++ b/src/desktop/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -88,9 +88,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -374,9 +374,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/desktop/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/desktop/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/desktop/Makefile + $(AUTOMAKE) --gnu src/desktop/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/src/include/Makefile.in b/src/include/Makefile.in index adc2345..608a9c6 100644 --- a/src/include/Makefile.in +++ b/src/include/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -85,9 +85,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -380,9 +380,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/include/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/include/Makefile + $(AUTOMAKE) --gnu src/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/src/include/ecryptfs.h b/src/include/ecryptfs.h index a644061..3d64dfd 100644 --- a/src/include/ecryptfs.h +++ b/src/include/ecryptfs.h @@ -515,10 +515,12 @@ int ecryptfs_read_salt_hex_from_rc(char *salt_hex); int ecryptfs_check_sig(char *auth_tok_sig, char *sig_cache_filename, int *flags); int ecryptfs_append_sig(char *auth_tok_sig, char *sig_cache_filename); +int __ecryptfs_detect_wrapped_passphrase_file_version(const char *filename, + uint8_t *version); int ecryptfs_wrap_passphrase_file(char *dest, char *wrapping_passphrase, char *wrapping_salt, char *src); int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase, - char *wrapping_salt, char *decrypted_passphrase); + char *unused, char *decrypted_passphrase); int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename, char *wrapping_passphrase, char *wrapping_salt); int ecryptfs_insert_wrapped_passphrase_into_keyring( diff --git a/src/key_mod/Makefile.in b/src/key_mod/Makefile.in index 53d0d1e..ef828e7 100644 --- a/src/key_mod/Makefile.in +++ b/src/key_mod/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -89,9 +89,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -494,9 +494,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/key_mod/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/key_mod/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/key_mod/Makefile + $(AUTOMAKE) --gnu src/key_mod/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -583,14 +583,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 $@ $< diff --git a/src/libecryptfs-swig/Makefile.in b/src/libecryptfs-swig/Makefile.in index 4996b86..1ffedba 100644 --- a/src/libecryptfs-swig/Makefile.in +++ b/src/libecryptfs-swig/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -86,9 +86,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -434,9 +434,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libecryptfs-swig/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libecryptfs-swig/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/libecryptfs-swig/Makefile + $(AUTOMAKE) --gnu src/libecryptfs-swig/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -507,14 +507,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 $@ $< diff --git a/src/libecryptfs/Makefile.in b/src/libecryptfs/Makefile.in index ac376b0..02d1da8 100644 --- a/src/libecryptfs/Makefile.in +++ b/src/libecryptfs/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -86,9 +86,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -445,9 +445,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libecryptfs/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libecryptfs/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/libecryptfs/Makefile + $(AUTOMAKE) --gnu src/libecryptfs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -531,14 +531,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 $@ $< diff --git a/src/libecryptfs/cmd_ln_parser.c b/src/libecryptfs/cmd_ln_parser.c index 6c4284c..c8d538e 100644 --- a/src/libecryptfs/cmd_ln_parser.c +++ b/src/libecryptfs/cmd_ln_parser.c @@ -367,8 +367,7 @@ int generate_nv_list(struct ecryptfs_name_val_pair *head, char *buf) goto out; } tok_str[j] = '\0'; - if ((rc = process_comma_tok(¤t, tok_str, NULL))) - goto out; + rc = process_comma_tok(¤t, tok_str, NULL); out: return rc; } diff --git a/src/libecryptfs/key_management.c b/src/libecryptfs/key_management.c index cea06d1..81a9c08 100644 --- a/src/libecryptfs/key_management.c +++ b/src/libecryptfs/key_management.c @@ -37,6 +37,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <pwd.h> +#include <inttypes.h> #include "../include/ecryptfs.h" #ifndef ENOKEY @@ -76,6 +77,9 @@ int ecryptfs_generate_passphrase_auth_tok(struct ecryptfs_auth_tok **auth_tok, if (rc) { syslog(LOG_ERR, "Error generating payload for auth tok key; " "rc = [%d]\n", rc); + memset(*auth_tok, 0, sizeof(struct ecryptfs_auth_tok)); + free(*auth_tok); + *auth_tok = NULL; rc = (rc < 0) ? rc : rc * -1; goto out; } @@ -241,6 +245,163 @@ out: return rc; } +/** + * A wrapper around write(2) that handles short and interrupted writes. + * + * Returns the number of bytes written or -1 with errno set on failure. + */ +static ssize_t do_write(int fd, const void *buf, size_t count) +{ + ssize_t rc = 0; + + do { + ssize_t bytes = write(fd, buf + rc, count - rc); + + if (bytes == -1) { + if (errno == EINTR) + continue; + return -1; + } + + rc += bytes; + } while (rc < count); + + return rc; +} + +/** + * A wrapper around read(2) that handles short and interrupted reads. + * + * Returns the number of bytes read or -1 with errno set on failure. + */ +static ssize_t do_read(int fd, void *buf, size_t count) +{ + ssize_t rc = 0; + + do { + ssize_t bytes = read(fd, buf + rc, count - rc); + + if (bytes == 0) { + break; + } else if (bytes == -1) { + if (errno == EINTR) + continue; + + return -1; + } + + rc += bytes; + } while (rc < count); + + return rc; +} + +/** + * read_wrapped_passphrase_file_version + * @fd: A file descriptor, opened for reading, of a wrapped passphrase file + * @version: On success, *version is set to the detected file version + * + * Sets the fd offset to 0 and attempts to determine the version number of the + * opened wrapped-passphrase file. If a versioned wrapped-passphrase file is + * not found and the first 16 bytes of the file are hex encoded values, then + * the version is assumed to be '1'. + * + * Returns 0 on success, sets *version to the determined wrapped-passphrase + * file version, and ensures that the fd offset is appropriately set for + * reading the next field in the wrapped passphrase file. Returns negative on + * error (*version and the fd offset is undefined upon error). + */ +static int read_wrapped_passphrase_file_version(int fd, uint8_t *version) +{ + char buf[ECRYPTFS_SIG_SIZE_HEX]; + int bytes_read, i; + + memset(buf, 0, sizeof(buf)); + + if (lseek(fd, 0, SEEK_SET) != 0) + return -errno; + + bytes_read = do_read(fd, buf, sizeof(buf)); + if (bytes_read < 0) + return -errno; + else if (bytes_read != sizeof(buf)) + return -EINVAL; + + if (buf[0] == ':') { + /* A leading ':' character means that this is a properly + * versioned wrapped passphrase file. The second octet contains + * the version number. + */ + uint8_t v = buf[1]; + + /* Only version 2 files are currently supported */ + if (v != 2) + return -ENOTSUP; + + /* Set the offset to the beginning of the wrapping salt field */ + if (lseek(fd, 2, SEEK_SET) != 2) + return -errno; + + *version = v; + } else { + /* This wrapped passphrase file isn't versioned. We can assume + * that it is a "version 1" file if the first 16 bytes are hex + * encoded values. + */ + for (i = 0; i < bytes_read; i++) { + if (!isxdigit(buf[i])) + return -EINVAL; + } + + /* Reset the offset to 0 since there is no actual version field + * in version 1 files + */ + if (lseek(fd, 0, SEEK_SET) != 0) + return -errno; + + *version = 1; + } + + return 0; +} + +/** + * __ecryptfs_detect_wrapped_passphrase_file_version + * @filename: The path of a wrapped passphrase file + * @version: On success, *version is set to the detected file version + * + * THIS FUNCTION IS NOT PART OF THE LIBECRYPTFS PUBLIC API. Code external to + * ecryptfs-utils should not use it. + * + * Detects the wrapped passphrase file version of @filename. + * + * Returns 0 on success, sets *version to the determined wrapped-passphrase + * file version. Returns negative on error (*version is undefined upon error). + */ +int __ecryptfs_detect_wrapped_passphrase_file_version(const char *filename, + uint8_t *version) +{ + int fd = -1; + int rc; + + fd = open(filename, O_RDONLY); + if (fd == -1) { + rc = -errno; + goto out; + } + + rc = read_wrapped_passphrase_file_version(fd, version); + if (rc != 0) + goto out; + + rc = 0; +out: + if (fd != -1) + close(fd); + + return rc; +} + int ecryptfs_wrap_passphrase_file(char *dest, char *wrapping_passphrase, char *salt, char *src) { @@ -257,8 +418,8 @@ int ecryptfs_wrap_passphrase_file(char *dest, char *wrapping_passphrase, rc = -EIO; goto out; } - if ((size = read(fd, decrypted_passphrase, - ECRYPTFS_MAX_PASSPHRASE_BYTES)) <= 0) { + if ((size = do_read(fd, decrypted_passphrase, + ECRYPTFS_MAX_PASSPHRASE_BYTES)) <= 0) { syslog(LOG_ERR, "Error attempting to read encrypted " "passphrase from file [%s]; size = [%zd]\n", src, size); @@ -282,9 +443,127 @@ out: return rc; } +static int read_urandom(void *buf, size_t count) +{ + ssize_t bytes; + int fd = -1; + + fd = open("/dev/urandom", O_RDONLY); + if (fd == -1) + return -1; + + bytes = do_read(fd, buf, count); + close(fd); + + return bytes; +} + +/** + * write_v2_wrapped_passphrase_file + * @filename: Path to the wrapped passphrase file + * @wrapping_salt: The salt to be used with the wrapping passphrase + * @wrapping_key_sig: The signature of the wrapping key + * @encrypted_passphrase: The encrypted passphrase + * @encrypted_passphrase_bytes: The size of the encrypted passphrase + * + * Writes a version 2 wrapped passphrase file containing the following format + * described in the read_v2_wrapped_passphrase_file() function. + * + * Returns 0 upon success. Negative upon error. + */ +static int write_v2_wrapped_passphrase_file(const char *filename, + const char wrapping_salt[ECRYPTFS_SALT_SIZE], + const char wrapping_key_sig[ECRYPTFS_SIG_SIZE_HEX], + const char *encrypted_passphrase, + int encrypted_passphrase_bytes) +{ + ssize_t size; + uint8_t version = 2; + mode_t old_umask; + char *temp = NULL; + int fd = -1; + int rc; + + if (asprintf(&temp, "%s-XXXXXX", filename) < 0) { + rc = -errno; + temp = NULL; + goto out; + } + + old_umask = umask(S_IRWXG | S_IRWXO); + fd = mkstemp(temp); + umask(old_umask); + if (fd == -1) { + rc = -errno; + goto out; + } + + size = do_write(fd, ":", 1); + if (size != 1) { + rc = size == -1 ? -errno : -EIO; + goto out; + } + + size = do_write(fd, &version, 1); + if (size != 1) { + rc = size == -1 ? -errno : -EIO; + goto out; + } + + size = do_write(fd, wrapping_salt, ECRYPTFS_SALT_SIZE); + if (size != ECRYPTFS_SALT_SIZE) { + rc = size == -1 ? -errno : -EIO; + goto out; + } + + size = do_write(fd, wrapping_key_sig, ECRYPTFS_SIG_SIZE_HEX); + if (size != ECRYPTFS_SIG_SIZE_HEX) { + rc = size == -1 ? -errno : -EIO; + goto out; + } + + size = do_write(fd, encrypted_passphrase, encrypted_passphrase_bytes); + if (size != encrypted_passphrase_bytes) { + rc = size == -1 ? -errno : -EIO; + goto out; + } + + if (fsync(fd) == -1) { + rc = -errno; + goto out; + } + + close(fd); + fd = -1; + + if (rename(temp, filename) == -1) { + rc = -errno; + goto out; + } + + rc = 0; +out: + if (fd != -1) + close(fd); + free(temp); + + return rc; +} + +/** + * ecryptfs_wrap_passphrase + * @filename: Path to the wrapped passphrase file + * @wrapping_passphrase: The passphrase used for wrapping the @decrypted_passphrase + * @unused: Previously used for specifying a wrapping salt. It is now randomly + * generated so @unused is no longer used. + * @decrypted_passphrase: The passphrase to be wrapped + * + * Returns 0 upon success. Negative upon error. + */ int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase, - char *wrapping_salt, char *decrypted_passphrase) + char *unused, char *decrypted_passphrase) { + char wrapping_salt[ECRYPTFS_SALT_SIZE]; char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1]; char wrapping_key[ECRYPTFS_MAX_KEY_BYTES]; char padded_decrypted_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES + @@ -315,6 +594,13 @@ int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase, rc = -EIO; goto out; } + rc = read_urandom(wrapping_salt, ECRYPTFS_SALT_SIZE); + if (rc != ECRYPTFS_SALT_SIZE) { + rc = rc == -1 ? -errno : -EIO; + syslog(LOG_ERR, "Error generating random salt: %s\n", + strerror(-rc)); + goto out; + } rc = generate_passphrase_sig(wrapping_auth_tok_sig, wrapping_key, wrapping_salt, wrapping_passphrase); if (rc) { @@ -392,35 +678,163 @@ nss_finish: rc = - EIO; goto out; } - unlink(filename); - if ((fd = open(filename, (O_WRONLY | O_CREAT | O_EXCL), - (S_IRUSR | S_IWUSR))) == -1) { - syslog(LOG_ERR, "Error attempting to open [%s] for writing\n", + rc = write_v2_wrapped_passphrase_file(filename, wrapping_salt, + wrapping_auth_tok_sig, + encrypted_passphrase, + encrypted_passphrase_bytes); + if (rc) + goto out; + rc = 0; +out: + return rc; +} + +/** + * read_v1_wrapped_passphrase_file - Reads a v1 wrapped passphrase file + * @filename: Path to the wrapped passphrase file + * @wrapping_key_sig: Will contain the parsed wrapping key sig upon success. + * MUST be zeroed prior to calling this function. + * @encrypted_passphrase: Will contain the parsed encrypted passphrase upon + * success. MUST be zeroed prior to calling this function. + * @encrypted_passphrase_bytes: Will contain the size of the parsed encrypted + * passphrase upon success + * + * Reads a version 1 wrapped passphrase file containing the following format: + * + * Octets 0-15: Signature of wrapping key + * Octets 16-79: Variable length field containing the encrypted + * passphrase. + * + * Returns 0 upon success with the size of the encrypted passphrase returned in + * *encrypted_passphrase_bytes. Returns negative upon failure. + */ +static int read_v1_wrapped_passphrase_file(const char *filename, + char wrapping_key_sig[ECRYPTFS_SIG_SIZE_HEX], + char encrypted_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES], + int *encrypted_passphrase_bytes) +{ + ssize_t size; + int fd; + int rc; + + *encrypted_passphrase_bytes = 0; + + if ((fd = open(filename, O_RDONLY)) == -1) { + syslog(LOG_ERR, "Error attempting to open [%s] for reading\n", filename); rc = -EIO; goto out; } - if ((size = write(fd, wrapping_auth_tok_sig, - ECRYPTFS_SIG_SIZE_HEX)) <= 0) { - syslog(LOG_ERR, "Error attempting to write encrypted " - "passphrase ([%d] bytes) to file [%s]; size = [%zu]\n", - encrypted_passphrase_bytes, filename, size); + + if ((size = do_read(fd, wrapping_key_sig, + ECRYPTFS_SIG_SIZE_HEX)) < ECRYPTFS_SIG_SIZE_HEX) { + syslog(LOG_ERR, + "Error attempting to read encrypted passphrase from file [%s]; size = [%zu]\n", + filename, size); rc = -EIO; - close(fd); goto out; } - if ((size = write(fd, encrypted_passphrase, - encrypted_passphrase_bytes)) <= 0) { - syslog(LOG_ERR, "Error attempting to write encrypted " - "passphrase ([%d] bytes) to file [%s]; size = [%zu]\n", - encrypted_passphrase_bytes, filename, size); + + if ((size = do_read(fd, encrypted_passphrase, + ECRYPTFS_MAX_PASSPHRASE_BYTES)) <= 0) { + syslog(LOG_ERR, + "Error attempting to read encrypted passphrase from file [%s]; size = [%zu]\n", + filename, size); rc = -EIO; + goto out; + } + + *encrypted_passphrase_bytes = size; + rc = 0; +out: + if (fd != -1) close(fd); + + return 0; +} + +/** + * read_v2_wrapped_passphrase_file - Reads a v2 wrapped passphrase file + * @filename: Path to the wrapped passphrase file + * @wrapping_salt: Will contain the parsed wrapping salt upon success. MUST be + * zeroed prior to calling this function. + * @wrapping_key_sig: Will contain the parsed wrapping key sig upon success. + * MUST be zeroed prior to calling this function. + * @encrypted_passphrase: Will contain the parsed encrypted passphrase upon + * success. MUST be zeroed prior to calling this function. + * @encrypted_passphrase_bytes: Will contain the size of the parsed encrypted + * passphrase upon success + * + * Reads a version 2 wrapped passphrase file containing the following format: + * + * Octet 0: A ':' character + * Octet 1: uint8_t value indicating file version (MUST be 0x02) + * Octets 2-9: Wrapping salt + * Octets 10-25: Signature of wrapping key (16 octets) + * Octets 26-N1: Variable length field containing the encrypted + * passphrase. (Up to 64 octets. Must be non-empty.) + * + * Returns 0 upon success with the size of the encrypted passphrase returned in + * *encrypted_passphrase_bytes. Returns negative upon failure. + */ +static int read_v2_wrapped_passphrase_file(const char *filename, + char wrapping_salt[ECRYPTFS_SALT_SIZE], + char wrapping_key_sig[ECRYPTFS_SIG_SIZE_HEX], + char encrypted_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES], + int *encrypted_passphrase_bytes) +{ + uint8_t version = 0; + uint8_t salt_len = 0; + ssize_t size; + int fd = -1; + int rc; + + *encrypted_passphrase_bytes = 0; + + if ((fd = open(filename, O_RDONLY)) == -1) { + rc = -errno; goto out; } - close(fd); + + /* Parse file version (must be 2) */ + rc = read_wrapped_passphrase_file_version(fd, &version); + if (rc != 0) { + goto out; + } else if (version != 2) { + rc = -EINVAL; + goto out; + } + + /* Parse the wrapping salt */ + size = do_read(fd, wrapping_salt, ECRYPTFS_SALT_SIZE); + if (size != ECRYPTFS_SALT_SIZE) { + rc = size == -1 ? errno : -EINVAL; + goto out; + } + + /* Parse the wrapping key signature */ + size = do_read(fd, wrapping_key_sig, ECRYPTFS_SIG_SIZE_HEX); + if (size != ECRYPTFS_SIG_SIZE_HEX) { + rc = size == -1 ? errno : -EINVAL; + goto out; + } + + /* Parse the encrypted passphrase */ + size = do_read(fd, encrypted_passphrase, ECRYPTFS_MAX_PASSPHRASE_BYTES); + if (size < 0) { + rc = size; + goto out; + } else if(size == 0) { + rc = -EINVAL; + goto out; + } + + *encrypted_passphrase_bytes = size; rc = 0; out: + if (fd != -1) + close(fd); + return rc; } @@ -431,6 +845,7 @@ out: int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename, char *wrapping_passphrase, char *wrapping_salt) { + char v2_wrapping_salt[ECRYPTFS_SALT_SIZE]; char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1]; char wrapping_auth_tok_sig_from_file[ECRYPTFS_SIG_SIZE_HEX + 1]; char wrapping_key[ECRYPTFS_MAX_KEY_BYTES]; @@ -445,14 +860,53 @@ int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename, PK11SlotInfo *slot = NULL; PK11Context *enc_ctx = NULL; SECItem *sec_param = NULL; + uint8_t version = 0; int encrypted_passphrase_bytes; - int fd; - ssize_t size; int rc; memset(wrapping_auth_tok_sig_from_file, 0, sizeof(wrapping_auth_tok_sig_from_file)); memset(encrypted_passphrase, 0, sizeof(encrypted_passphrase)); + + rc = __ecryptfs_detect_wrapped_passphrase_file_version(filename, + &version); + if (rc) { + syslog(LOG_ERR, + "Failed to detect wrapped passphrase version: %s\n", + strerror(-rc)); + goto out; + } + + if (version == 1) { + rc = read_v1_wrapped_passphrase_file(filename, + wrapping_auth_tok_sig_from_file, + encrypted_passphrase, + &encrypted_passphrase_bytes); + if (rc) + goto out; + } else if (version == 2) { + rc = read_v2_wrapped_passphrase_file(filename, + v2_wrapping_salt, + wrapping_auth_tok_sig_from_file, + encrypted_passphrase, + &encrypted_passphrase_bytes); + if (rc) + goto out; + + /** + * Version 2 wrapped passphrase self-contains the wrapping salt. + * The passed in @wrapping_salt buffer is ignored and the + * parsed wrapping salt is used instead. + */ + wrapping_salt = v2_wrapping_salt; + } else { + syslog(LOG_ERR, + "Unsupported wrapped passphrase file version: %u\n", + version); + rc = -ENOTSUP; + goto out; + } + rc = generate_passphrase_sig(wrapping_auth_tok_sig, wrapping_key, wrapping_salt, wrapping_passphrase); if (rc) { @@ -461,31 +915,7 @@ int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename, rc = (rc < 0) ? rc : rc * -1; goto out; } - if ((fd = open(filename, O_RDONLY)) == -1) { - syslog(LOG_ERR, "Error attempting to open [%s] for reading\n", - filename); - rc = -EIO; - goto out; - } - if ((size = read(fd, wrapping_auth_tok_sig_from_file, - ECRYPTFS_SIG_SIZE_HEX)) <= 0) { - syslog(LOG_ERR, "Error attempting to read encrypted " - "passphrase from file [%s]; size = [%zu]\n", - filename, size); - rc = -EIO; - close(fd); - goto out; - } - if ((size = read(fd, encrypted_passphrase, - ECRYPTFS_MAX_PASSPHRASE_BYTES)) <= 0) { - syslog(LOG_ERR, "Error attempting to read encrypted " - "passphrase from file [%s]; size = [%zu]\n", - filename, size); - rc = -EIO; - close(fd); - goto out; - } - close(fd); + if (memcmp(wrapping_auth_tok_sig_from_file, wrapping_auth_tok_sig, ECRYPTFS_SIG_SIZE_HEX) != 0) { syslog(LOG_ERR, "Incorrect wrapping key for file [%s]\n", @@ -493,7 +923,6 @@ int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename, rc = -EIO; goto out; } - encrypted_passphrase_bytes = size; NSS_NoDB_Init(NULL); slot = PK11_GetBestSlot(CKM_AES_ECB, NULL); key_item.data = (unsigned char *)wrapping_key; diff --git a/src/libecryptfs/key_mod.c b/src/libecryptfs/key_mod.c index 74ca0f3..e9f5bfd 100644 --- a/src/libecryptfs/key_mod.c +++ b/src/libecryptfs/key_mod.c @@ -252,7 +252,8 @@ int ecryptfs_register_key_modules(struct ecryptfs_ctx* ctx) } if (!(dp = opendir(dir_name))) { syslog(LOG_WARNING, - "ERROR: Could not open key_mod directory\n"); + "ERROR: Could not open key_mod directory [%s]\n", + dir_name); rc = -EPERM; goto out; } diff --git a/src/pam_ecryptfs/Makefile.in b/src/pam_ecryptfs/Makefile.in index 276c970..c67ed01 100644 --- a/src/pam_ecryptfs/Makefile.in +++ b/src/pam_ecryptfs/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -85,9 +85,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -421,9 +421,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/pam_ecryptfs/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/pam_ecryptfs/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/pam_ecryptfs/Makefile + $(AUTOMAKE) --gnu src/pam_ecryptfs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -494,14 +494,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 $@ $< diff --git a/src/pam_ecryptfs/pam_ecryptfs.c b/src/pam_ecryptfs/pam_ecryptfs.c index 49b42b5..89ce99a 100644 --- a/src/pam_ecryptfs/pam_ecryptfs.c +++ b/src/pam_ecryptfs/pam_ecryptfs.c @@ -94,6 +94,34 @@ static int wrap_passphrase_if_necessary(const char *username, uid_t uid, char *w return 0; } +static int rewrap_passphrase_if_necessary(char *wrapped_pw_filename, + char *wrapping_passphrase, char *salt) +{ + char passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES + 1]; + uint8_t version; + int rc; + + memset(passphrase, 0, sizeof(passphrase)); + + rc = __ecryptfs_detect_wrapped_passphrase_file_version( + wrapped_pw_filename, + &version); + if (rc) + return rc; + + /* Only rewrap version 1 files */ + if (version > 1) + return 0; + + rc = ecryptfs_unwrap_passphrase(passphrase, wrapped_pw_filename, + wrapping_passphrase, salt); + if (rc) + return rc; + + return ecryptfs_wrap_passphrase(wrapped_pw_filename, + wrapping_passphrase, NULL, passphrase); +} + PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv) { @@ -201,6 +229,10 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, } else { goto out_child; } + if (rewrap_passphrase_if_necessary(wrapped_pw_filename, passphrase, salt)) { + /* Non fatal condition. Log a warning. */ + syslog(LOG_WARNING, "pam_ecryptfs: Unable to rewrap passphrase file\n"); + } rc = ecryptfs_insert_wrapped_passphrase_into_keyring( auth_tok_sig, wrapped_pw_filename, passphrase, salt); @@ -336,10 +368,10 @@ static int private_dir(pam_handle_t *pamh, int mount) } clearenv(); if (setgroups(1, &pwd->pw_gid) < 0 || setgid(pwd->pw_gid) < 0) - return -1; + exit(-1); /* run mount.ecryptfs_private as the user */ if (setresuid(pwd->pw_uid, pwd->pw_uid, pwd->pw_uid) < 0) - return -1; + exit(-1); execl("/sbin/mount.ecryptfs_private", "mount.ecryptfs_private", NULL); } else { @@ -350,10 +382,10 @@ static int private_dir(pam_handle_t *pamh, int mount) } clearenv(); if (setgroups(1, &pwd->pw_gid) < 0 || setgid(pwd->pw_gid) < 0) - return -1; + exit(-1); /* run umount.ecryptfs_private as the user */ if (setresuid(pwd->pw_uid, pwd->pw_uid, pwd->pw_uid) < 0) - return -1; + exit(-1); execl("/sbin/umount.ecryptfs_private", "umount.ecryptfs_private", NULL); exit(1); diff --git a/src/utils/Makefile.in b/src/utils/Makefile.in index b243e08..156aed9 100644 --- a/src/utils/Makefile.in +++ b/src/utils/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -98,9 +98,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -737,9 +737,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/utils/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/utils/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/utils/Makefile + $(AUTOMAKE) --gnu src/utils/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -979,14 +979,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 $@ $< diff --git a/src/utils/ecryptfs-setup-private b/src/utils/ecryptfs-setup-private index 5969ed2..3d9f046 100755 --- a/src/utils/ecryptfs-setup-private +++ b/src/utils/ecryptfs-setup-private @@ -95,9 +95,9 @@ error_testing() { random_passphrase () { bytes=$1 - # Pull $1 of random data from /dev/urandom, + # Pull $1 of random data from /dev/random, # and convert to a string of hex digits - od -x -N $bytes --width=$bytes /dev/urandom | head -n 1 | sed "s/^0000000//" | sed "s/\s*//g" + od -x -N $bytes --width=$bytes /dev/random | head -n 1 | sed "s/^0000000//" | sed "s/\s*//g" } filename_encryption_available() { diff --git a/src/utils/ecryptfs-setup-swap b/src/utils/ecryptfs-setup-swap index 042c743..4ec7de1 100755 --- a/src/utils/ecryptfs-setup-swap +++ b/src/utils/ecryptfs-setup-swap @@ -150,8 +150,8 @@ for swap in $swaps; do info `gettext "Setting up swap:"` "[$swap]" uuid=$(blkid -o value -s UUID $swap) for target in "UUID=$uuid" $swap; do - if [ -n "$target" ] && grep -qs "^$target " /etc/fstab; then - sed -i "s:^$target :\#$target :" /etc/fstab + if [ -n "$target" ] && grep -qs "^$target\s\+" /etc/fstab; then + sed -i "s:^$target\s\+:\#$target :" /etc/fstab warn "Commented out your unencrypted swap from /etc/fstab" fi done @@ -161,7 +161,9 @@ for swap in $swaps; do [ -e "/dev/mapper/cryptswap$i" ] || break done # Add crypttab entry - echo "cryptswap$i UUID=$uuid /dev/urandom swap,cipher=aes-cbc-essiv:sha256" >> /etc/crypttab + # Use /dev/urandom, since this is not a long lived key (generated each boot), + # and so that we don't block booting while waiting for entropy + echo "cryptswap$i UUID=$uuid /dev/urandom swap,offset=1024,cipher=aes-xts-plain64" >> /etc/crypttab # Add fstab entry echo "/dev/mapper/cryptswap$i none swap sw 0 0" >> /etc/fstab @@ -178,4 +180,4 @@ if [ "$NO_RELOAD" != 1 ]; then swapon -a fi -info `gettext "Successfully setup encrypted swap!"` +info `gettext "Successfully encrypted swap!"` diff --git a/src/utils/mount.ecryptfs.c b/src/utils/mount.ecryptfs.c index 4b83979..ab3d85c 100644 --- a/src/utils/mount.ecryptfs.c +++ b/src/utils/mount.ecryptfs.c @@ -270,6 +270,7 @@ static int process_sig(char *auth_tok_sig, struct passwd *pw) yesno = NULL; do { free(yesno); + yesno = NULL; if ((rc = get_string_stdin(&yesno, "Would you like to proceed with " "the mount (yes/no)? ",ECRYPTFS_ECHO_ON))) @@ -311,10 +312,10 @@ static int process_sig(char *auth_tok_sig, struct passwd *pw) } } } else { + rc = ECANCELED; if (strcmp(yesno,"no")) rc = -EINVAL; printf("Aborting mount.\n"); - rc = ECANCELED; goto out; } } @@ -576,6 +577,12 @@ int main(int argc, char **argv) goto out; } mnt_params = malloc(sizeof(struct val_node)); + if (!mnt_params) { + fprintf(stderr, "Unable to allocate memory for mount " + "parameters buffer\n"); + rc = -ENOMEM; + goto out; + } memset(mnt_params, 0, sizeof(struct val_node)); memset(&ctx, 0, sizeof(struct ecryptfs_ctx)); ctx.get_string = &get_string_stdin; diff --git a/test-driver b/test-driver index 32bf39e..d306056 100755 --- a/test-driver +++ b/test-driver @@ -1,7 +1,7 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2012-06-27.10; # UTC +scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-2013 Free Software Foundation, Inc. # @@ -44,13 +44,12 @@ print_usage () Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. END } -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. @@ -69,10 +68,23 @@ while test $# -gt 0; do --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; + *) break;; esac shift done +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + if test $color_tests = yes; then # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. red='[0;31m' # Red. diff --git a/tests/Makefile.in b/tests/Makefile.in index 00b4977..4f77156 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -85,9 +85,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -393,9 +393,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tests/Makefile + $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/tests/kernel/Makefile.am b/tests/kernel/Makefile.am index 5758677..acf0349 100644 --- a/tests/kernel/Makefile.am +++ b/tests/kernel/Makefile.am @@ -28,6 +28,7 @@ dist_noinst_SCRIPTS = directory-concurrent.sh \ mmap-bmap.sh \ mmap-close.sh \ mmap-dir.sh \ + namelen.sh \ read-dir.sh \ setattr-flush-dirty.sh \ trunc-file.sh diff --git a/tests/kernel/Makefile.in b/tests/kernel/Makefile.in index 85e3355..d2d2144 100644 --- a/tests/kernel/Makefile.in +++ b/tests/kernel/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -106,9 +106,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -492,6 +492,7 @@ dist_noinst_SCRIPTS = directory-concurrent.sh \ mmap-bmap.sh \ mmap-close.sh \ mmap-dir.sh \ + namelen.sh \ read-dir.sh \ setattr-flush-dirty.sh \ trunc-file.sh @@ -528,9 +529,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/kernel/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/kernel/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tests/kernel/Makefile + $(AUTOMAKE) --gnu tests/kernel/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/tests/kernel/lp-509180.sh b/tests/kernel/lp-509180.sh index 854bd56..fa7cc72 100755 --- a/tests/kernel/lp-509180.sh +++ b/tests/kernel/lp-509180.sh @@ -22,6 +22,7 @@ test_script_dir=$(dirname $0) rc=1 test_dir="" +xattr_opt="" . ${test_script_dir}/../lib/etl_funcs.sh @@ -48,14 +49,18 @@ echo "testing 1 2 3" > $test_dir/test_file old_sum=`md5sum $test_dir/test_file | cut -d ' ' -f 1` lower_file=`ls $ETL_MOUNT_SRC/ECRYPTFS*/*` +if etl_is_mount_opt_set "ecryptfs_xattr_metadata" ; then + xattr_opt="-x" +fi + # Increment 9th byte so that eCryptfs marker fails validation -${test_script_dir}/lp-509180/test -i $lower_file || exit +${test_script_dir}/lp-509180/test -i $xattr_opt $lower_file || exit etl_umount etl_mount_i || exit cat $test_dir/test_file &> /dev/null # Decrement 9th byte so that eCryptfs marker passes validation -${test_script_dir}/lp-509180/test -d $lower_file || exit +${test_script_dir}/lp-509180/test -d $xattr_opt $lower_file || exit new_sum=`md5sum $test_dir/test_file | cut -d ' ' -f 1` # md5sums should be the same diff --git a/tests/kernel/lp-509180/test.c b/tests/kernel/lp-509180/test.c index 5b4886b..60cd017 100644 --- a/tests/kernel/lp-509180/test.c +++ b/tests/kernel/lp-509180/test.c @@ -26,6 +26,7 @@ #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> +#include <attr/xattr.h> #define TEST_ERROR (2) @@ -33,12 +34,99 @@ #define OPT_INC (0x0001) #define OPT_DEC (0x0002) +#define OPT_XATTR (0x0004) void usage(char *name) { - fprintf(stderr, "Usage: [-i | -d] file\n"); + fprintf(stderr, "Usage: [-i | -d] [-x] file\n"); } +static int test_with_metadata_in_header(int fd, int flags) +{ + unsigned char buffer[1]; + + if ((lseek(fd, (off_t)OFFSET, SEEK_SET)) < 0) { + fprintf(stderr, "Cannot lseek to offset %d: %s\n", + OFFSET, strerror(errno)); + return TEST_ERROR; + } + + if (read(fd, buffer, sizeof(buffer)) != sizeof(buffer)) { + fprintf(stderr, "Failed to read\n"); + return TEST_ERROR; + } + + if (flags & OPT_INC) + buffer[0]++; + + if (flags & OPT_DEC) + buffer[0]--; + + if ((lseek(fd, (off_t)OFFSET, SEEK_SET)) < 0) { + fprintf(stderr, "Cannot lseek to offset %d: %s\n", + OFFSET, strerror(errno)); + return TEST_ERROR; + } + + if (write(fd, buffer, sizeof(buffer)) != sizeof(buffer)) { + fprintf(stderr, "Failed to write\n"); + return TEST_ERROR; + } + + return 0; +} + +static int test_with_metadata_in_xattr(int fd, int flags) +{ + const char *name = "user.ecryptfs"; + unsigned char *value = NULL; + ssize_t nread, size = 0; + int rc = TEST_ERROR; + + size = fgetxattr(fd, name, value, size); + if (size < 0) { + fprintf(stderr, "Cannot retrieve xattr size: %s\n", + strerror(errno)); + goto out; + } + + value = malloc(size); + if (!value) { + fprintf(stderr, + "Cannot allocate memory to store the xattr value\n"); + goto out; + } + + nread = fgetxattr(fd, name, value, size); + if (nread != size) { + if (nread < 0) + fprintf(stderr, "Cannot read xattr: %s\n", + strerror(errno)); + else + fprintf(stderr, "Partial xattr read: %zu < %zu\n", + nread, size); + goto out; + } + + if (flags & OPT_INC) + value[OFFSET]++; + + if (flags & OPT_DEC) + value[OFFSET]--; + + if (fsetxattr(fd, name, value, size, XATTR_REPLACE) < 0) { + fprintf(stderr, "Cannot write xattr: %s\n", strerror(errno)); + goto out; + } + + rc = 0; +out: + free(value); + + return rc; +} + + /* * https://bugs.launchpad.net/ecryptfs/+bug/509180 * Increment/Decrement 9th byte in lower file @@ -49,14 +137,13 @@ int main(int argc, char **argv) int opt, flags = 0; int rc = 0; char *file; - unsigned char buffer[1]; if (argc < 3) { usage(argv[0]); exit(TEST_ERROR); } - while ((opt = getopt(argc, argv, "id")) != -1) { + while ((opt = getopt(argc, argv, "idx")) != -1) { switch (opt) { case 'i': flags |= OPT_INC; @@ -64,6 +151,9 @@ int main(int argc, char **argv) case 'd': flags |= OPT_DEC; break; + case 'x': + flags |= OPT_XATTR; + break; default: usage(argv[0]); exit(TEST_ERROR); @@ -82,36 +172,10 @@ int main(int argc, char **argv) exit(TEST_ERROR); } - if ((lseek(fd, (off_t)OFFSET, SEEK_SET)) < 0) { - fprintf(stderr, "Cannot lseek to offset %d in %s : %s\n", - OFFSET, file, strerror(errno)); - rc = TEST_ERROR; - goto tidy; - } - - if (read(fd, buffer, sizeof(buffer)) != sizeof(buffer)) { - fprintf(stderr, "Failed to read\n"); - rc = TEST_ERROR; - goto tidy; - } - - if (flags & OPT_INC) - buffer[0]++; - - if (flags & OPT_DEC) - buffer[0]--; - - if ((lseek(fd, (off_t)OFFSET, SEEK_SET)) < 0) { - fprintf(stderr, "Cannot lseek to offset %d in %s : %s\n", - OFFSET, file, strerror(errno)); - rc = TEST_ERROR; - goto tidy; - } - - if (write(fd, buffer, sizeof(buffer)) != sizeof(buffer)) { - fprintf(stderr, "Failed to write\n"); - rc = TEST_ERROR; - } + if (flags & OPT_XATTR) + rc = test_with_metadata_in_xattr(fd, flags); + else + rc = test_with_metadata_in_header(fd, flags); tidy: if (close(fd) < 0) { diff --git a/tests/kernel/lp-872905.sh b/tests/kernel/lp-872905.sh index 59244b8..55c4dfa 100755 --- a/tests/kernel/lp-872905.sh +++ b/tests/kernel/lp-872905.sh @@ -66,11 +66,13 @@ if [ $? -ne 0 ]; then fi # -# We shouldn't have a lower file created of zero bytes size if -# the bug is fixed +# If xattr metadata is not enabled, we shouldn't have a zero length lower file. +# If xattr metadata is enabled, the expected lower file size is 0. # sz=$(stat -c%s $lower_test_file) -if [ $sz -ne 0 ]; then +if ! etl_is_mount_opt_set "ecryptfs_xattr_metadata" && [ $sz -ne 0 ]; then + rc=0 +elif etl_is_mount_opt_set "ecryptfs_xattr_metadata" && [ $sz -eq 0 ]; then rc=0 fi diff --git a/tests/kernel/namelen.sh b/tests/kernel/namelen.sh new file mode 100755 index 0000000..1a17455 --- /dev/null +++ b/tests/kernel/namelen.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# +# namelen.sh: Test for validating namelen reported by eCryptfs +# Author: Tyler Hicks <tyhicks@canonical.com> +# +# Copyright (C) 2014 Canonical Ltd. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation version 2 +# of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +test_script_dir=$(dirname $0) +rc=1 + +. ${test_script_dir}/../lib/etl_funcs.sh + +test_cleanup() +{ + etl_remove_test_dir "$test_dir" + etl_umount + etl_lumount + etl_unlink_keys + exit $rc +} +trap test_cleanup 0 1 2 3 15 + +etl_add_keys || exit +etl_lmount || exit +etl_mount_i || exit +test_dir=$(etl_create_test_dir) || exit +test_file="$test_dir/a" + +namelen=$(getconf NAME_MAX "$test_dir") +[ $namelen -le 0 ] && exit + +# Make sure we can create any file up to namelen chars long +for ((i=1; i <= $namelen; i++)); do + touch "$test_file" || exit + rm $test_file + test_file+=a +done + +# Throw an error if creating a file (namelen + 1) chars long succeeds +test_file+=a +touch "$test_file" 2>/dev/null && exit + +rc=0 +exit diff --git a/tests/kernel/tests.rc b/tests/kernel/tests.rc index 269266a..5c08810 100644 --- a/tests/kernel/tests.rc +++ b/tests/kernel/tests.rc @@ -1,2 +1,2 @@ destructive="miscdev-bad-count.sh extend-file-random.sh trunc-file.sh directory-concurrent.sh file-concurrent.sh lp-994247.sh" -safe="llseek.sh lp-469664.sh lp-524919.sh lp-509180.sh lp-613873.sh lp-745836.sh lp-870326.sh lp-885744.sh lp-926292.sh inotify.sh mmap-bmap.sh mmap-close.sh mmap-dir.sh read-dir.sh setattr-flush-dirty.sh inode-race-stat.sh lp-1009207.sh enospc.sh lp-911507.sh lp-872905.sh lp-561129.sh mknod.sh link.sh xattr.sh" +safe="llseek.sh lp-469664.sh lp-524919.sh lp-509180.sh lp-613873.sh lp-745836.sh lp-870326.sh lp-885744.sh lp-926292.sh inotify.sh mmap-bmap.sh mmap-close.sh mmap-dir.sh read-dir.sh setattr-flush-dirty.sh inode-race-stat.sh lp-1009207.sh enospc.sh lp-911507.sh lp-872905.sh lp-561129.sh mknod.sh link.sh xattr.sh namelen.sh" diff --git a/tests/kernel/xattr/test.c b/tests/kernel/xattr/test.c index a552fbc..e2f819d 100644 --- a/tests/kernel/xattr/test.c +++ b/tests/kernel/xattr/test.c @@ -26,6 +26,8 @@ #include <errno.h> #include <sys/xattr.h> +#define XATTR_METADATA_NAME "user.ecryptfs" + static const char *names[] = { "user.test1", "user.test2", @@ -40,20 +42,42 @@ static const char *values[] = { NULL }; +static void usage(const char *name) +{ + fprintf(stderr, "Usage: %s [-x] file\n", name); +} + int main(int argc, char **argv) { ssize_t len, names_len = 0; - int i, rc; + int i, rc, xattr_metadata = 0; char buffer[1024]; - char *ptr = buffer; + char *file, *ptr = buffer; - if (argc != 2) { - fprintf(stderr, "Usage: %s file\n", argv[0]); + if (argc < 2 || argc > 3) { + usage(argv[0]); exit(EXIT_FAILURE); } + file = argv[1]; + + if (argc == 3) { + if (strcmp(argv[1], "-x")) { + usage(argv[0]); + exit(EXIT_FAILURE); + } + file = argv[2]; + + /* + * The XATTR_METADATA_NAME xattr is set. Account for it in + * future sanity checks. + */ + xattr_metadata = 1; + names_len = 1 + strlen(XATTR_METADATA_NAME); + } + for (i = 0; names[i]; i++) { - if (setxattr(argv[1], names[i], values[i], strlen(values[i]), 0) < 0) + if (setxattr(file, names[i], values[i], strlen(values[i]), 0) < 0) exit(EXIT_FAILURE); names_len += 1 + strlen(names[i]); } @@ -61,28 +85,42 @@ int main(int argc, char **argv) /* * Sanity check that listxattr returns correct length */ - len = listxattr(argv[1], NULL, 0); - if (len != names_len) + len = listxattr(file, NULL, 0); + if (len != names_len || len > sizeof(buffer)) exit(EXIT_FAILURE); - len = listxattr(argv[1], buffer, sizeof(buffer)); - if (len < 0) + memset(buffer, 0, sizeof(buffer)); + + len = listxattr(file, buffer, sizeof(buffer)); + if (len != names_len) exit(EXIT_FAILURE); /* * Check listxattr names match what has been just set */ - for (i = 0; names[i]; i++) { - if (strcmp(names[i], ptr)) + for (ptr = buffer; *ptr; ptr += strlen(ptr) + 1) { + int matched = 0; + + if (xattr_metadata && !strcmp(XATTR_METADATA_NAME, ptr)) + continue; + + for (i = 0; names[i]; i++) { + if (strcmp(names[i], ptr)) + continue; + + matched = 1; + break; + } + + if (!matched) exit(EXIT_FAILURE); - ptr += strlen(ptr) + 1; } /* * Check contents of xattr */ for (i = 0; names[i]; i++) { - len = getxattr(argv[1], names[i], buffer, sizeof(buffer)); + len = getxattr(file, names[i], buffer, sizeof(buffer)); if (len < 0) exit(EXIT_FAILURE); buffer[len] = '\0'; @@ -95,16 +133,18 @@ int main(int argc, char **argv) * Remove xattr */ for (i = 0; names[i]; i++) { - rc = removexattr(argv[1], names[i]); + rc = removexattr(file, names[i]); if (rc < 0) exit(EXIT_FAILURE); + names_len -= 1 + strlen(names[i]); } /* - * ..and there should be no xattrs left + * ..and the only xattrs that should be left are those that were + * already there when the test started */ - len = listxattr(argv[1], NULL, 0); - if (len != 0) + len = listxattr(file, NULL, 0); + if (len != names_len) exit(EXIT_FAILURE); exit(EXIT_SUCCESS); diff --git a/tests/lib/Makefile.in b/tests/lib/Makefile.in index 2a431ae..e6866a6 100644 --- a/tests/lib/Makefile.in +++ b/tests/lib/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -87,9 +87,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -388,9 +388,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/lib/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tests/lib/Makefile + $(AUTOMAKE) --gnu tests/lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -436,14 +436,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 $@ $< diff --git a/tests/lib/etl_add_passphrase_key_to_keyring.c b/tests/lib/etl_add_passphrase_key_to_keyring.c index 2a9c265..b0e6843 100644 --- a/tests/lib/etl_add_passphrase_key_to_keyring.c +++ b/tests/lib/etl_add_passphrase_key_to_keyring.c @@ -36,6 +36,10 @@ int main(int argc, char *argv[]) return EINVAL; } + rc = ecryptfs_validate_keyring(); + if (rc) + return errno; + from_hex(salt, argv[2], ECRYPTFS_SALT_SIZE); rc = ecryptfs_add_passphrase_key_to_keyring(auth_tok_sig_hex, argv[1], salt); diff --git a/tests/lib/etl_funcs.sh b/tests/lib/etl_funcs.sh index 7803008..e8261e0 100644 --- a/tests/lib/etl_funcs.sh +++ b/tests/lib/etl_funcs.sh @@ -447,6 +447,38 @@ etl_lmax_filesize() echo $blks } +_etl_init_mount_opts() +{ + if [ -z "$ETL_MOUNT_OPTS" ]; then + opts=$default_mount_opts + + if [ -n "$ETL_FNEK_SIG" ]; then + opts="$default_fne_mount_opts" + fi + + if [ -n "$ETL_APPENDED_MOUNT_OPTS" ]; then + opts="${opts},${ETL_APPENDED_MOUNT_OPTS}" + fi + + export ETL_MOUNT_OPTS=$(eval "echo $opts") + fi +} + +etl_is_mount_opt_set() +{ + if [ -z "$1" ]; then + return 1 + fi + + _etl_init_mount_opts + + if [[ ! $ETL_MOUNT_OPTS =~ (^|,)$1($|,) ]]; then + return 1 + fi + + return 0 +} + # # etl_mount_i # @@ -461,15 +493,9 @@ etl_mount_i() if [ -z "$ETL_MOUNT_SRC" ] || [ -z "$ETL_MOUNT_DST" ]; then return 1 fi - if [ -z "$ETL_MOUNT_OPTS" ]; then - if [ -n "ETL_FNEK_SIG" ]; then - export ETL_MOUNT_OPTS=$(eval \ - "echo $default_fne_mount_opts") - else - export ETL_MOUNT_OPTS=$(eval "echo $default_mount_opts") - fi - fi - + + _etl_init_mount_opts + mount -it ecryptfs -o "$ETL_MOUNT_OPTS" \ "$ETL_MOUNT_SRC" "$ETL_MOUNT_DST" } diff --git a/tests/userspace/Makefile.am b/tests/userspace/Makefile.am index 5f61d5a..7bf0879 100644 --- a/tests/userspace/Makefile.am +++ b/tests/userspace/Makefile.am @@ -1,17 +1,15 @@ AUTOMAKE_OPTIONS = subdir-objects # Only place tests worth of 'make check' here. All other tests are noinst. -dist_check_SCRIPTS = lfs.sh verify-passphrase-sig.sh -check_PROGRAMS = lfs/test verify-passphrase-sig/test +dist_check_SCRIPTS = lfs.sh verify-passphrase-sig.sh wrap-unwrap.sh v1-to-v2-wrapped-passphrase.sh +check_PROGRAMS = lfs/test verify-passphrase-sig/test wrap-unwrap/test v1-to-v2-wrapped-passphrase/test dist_noinst_DATA = tests.rc -dist_noinst_SCRIPTS = $(dist_check_SCRIPTS) \ - wrap-unwrap.sh +dist_noinst_SCRIPTS = $(dist_check_SCRIPTS) if ENABLE_TESTS -noinst_PROGRAMS = $(check_PROGRAMS) \ - wrap-unwrap/test +noinst_PROGRAMS = $(check_PROGRAMS) endif lfs_test_SOURCES = lfs/test.c @@ -22,5 +20,8 @@ verify_passphrase_sig_test_LDADD = $(top_builddir)/src/libecryptfs/libecryptfs.l wrap_unwrap_test_SOURCES = wrap-unwrap/test.c wrap_unwrap_test_LDADD = $(top_builddir)/src/libecryptfs/libecryptfs.la -TESTS = lfs.sh verify-passphrase-sig.sh +v1_to_v2_wrapped_passphrase_test_SOURCES = v1-to-v2-wrapped-passphrase/test.c +v1_to_v2_wrapped_passphrase_test_LDADD = $(top_builddir)/src/libecryptfs/libecryptfs.la + +TESTS = lfs.sh verify-passphrase-sig.sh wrap-unwrap.sh v1-to-v2-wrapped-passphrase.sh diff --git a/tests/userspace/Makefile.in b/tests/userspace/Makefile.in index da54c3e..f7bda22 100644 --- a/tests/userspace/Makefile.in +++ b/tests/userspace/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.13.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -81,9 +81,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -check_PROGRAMS = lfs/test$(EXEEXT) verify-passphrase-sig/test$(EXEEXT) -@ENABLE_TESTS_TRUE@noinst_PROGRAMS = $(check_PROGRAMS) \ -@ENABLE_TESTS_TRUE@ wrap-unwrap/test$(EXEEXT) +check_PROGRAMS = lfs/test$(EXEEXT) verify-passphrase-sig/test$(EXEEXT) \ + wrap-unwrap/test$(EXEEXT) \ + v1-to-v2-wrapped-passphrase/test$(EXEEXT) subdir = tests/userspace DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(dist_check_SCRIPTS) $(dist_noinst_SCRIPTS) \ @@ -92,9 +92,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/ac_python_devel.m4 \ - $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -111,6 +111,12 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +am_v1_to_v2_wrapped_passphrase_test_OBJECTS = \ + v1-to-v2-wrapped-passphrase/test.$(OBJEXT) +v1_to_v2_wrapped_passphrase_test_OBJECTS = \ + $(am_v1_to_v2_wrapped_passphrase_test_OBJECTS) +v1_to_v2_wrapped_passphrase_test_DEPENDENCIES = \ + $(top_builddir)/src/libecryptfs/libecryptfs.la am_verify_passphrase_sig_test_OBJECTS = \ verify-passphrase-sig/test.$(OBJEXT) verify_passphrase_sig_test_OBJECTS = \ @@ -156,9 +162,12 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(lfs_test_SOURCES) $(verify_passphrase_sig_test_SOURCES) \ +SOURCES = $(lfs_test_SOURCES) \ + $(v1_to_v2_wrapped_passphrase_test_SOURCES) \ + $(verify_passphrase_sig_test_SOURCES) \ $(wrap_unwrap_test_SOURCES) DIST_SOURCES = $(lfs_test_SOURCES) \ + $(v1_to_v2_wrapped_passphrase_test_SOURCES) \ $(verify_passphrase_sig_test_SOURCES) \ $(wrap_unwrap_test_SOURCES) am__can_run_installinfo = \ @@ -596,17 +605,18 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = subdir-objects # Only place tests worth of 'make check' here. All other tests are noinst. -dist_check_SCRIPTS = lfs.sh verify-passphrase-sig.sh +dist_check_SCRIPTS = lfs.sh verify-passphrase-sig.sh wrap-unwrap.sh v1-to-v2-wrapped-passphrase.sh dist_noinst_DATA = tests.rc -dist_noinst_SCRIPTS = $(dist_check_SCRIPTS) \ - wrap-unwrap.sh - +dist_noinst_SCRIPTS = $(dist_check_SCRIPTS) +@ENABLE_TESTS_TRUE@noinst_PROGRAMS = $(check_PROGRAMS) lfs_test_SOURCES = lfs/test.c verify_passphrase_sig_test_SOURCES = verify-passphrase-sig/test.c verify_passphrase_sig_test_LDADD = $(top_builddir)/src/libecryptfs/libecryptfs.la wrap_unwrap_test_SOURCES = wrap-unwrap/test.c wrap_unwrap_test_LDADD = $(top_builddir)/src/libecryptfs/libecryptfs.la -TESTS = lfs.sh verify-passphrase-sig.sh +v1_to_v2_wrapped_passphrase_test_SOURCES = v1-to-v2-wrapped-passphrase/test.c +v1_to_v2_wrapped_passphrase_test_LDADD = $(top_builddir)/src/libecryptfs/libecryptfs.la +TESTS = lfs.sh verify-passphrase-sig.sh wrap-unwrap.sh v1-to-v2-wrapped-passphrase.sh all: all-am .SUFFIXES: @@ -620,9 +630,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/userspace/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/userspace/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign tests/userspace/Makefile + $(AUTOMAKE) --gnu tests/userspace/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -670,6 +680,19 @@ lfs/test.$(OBJEXT): lfs/$(am__dirstamp) lfs/$(DEPDIR)/$(am__dirstamp) lfs/test$(EXEEXT): $(lfs_test_OBJECTS) $(lfs_test_DEPENDENCIES) $(EXTRA_lfs_test_DEPENDENCIES) lfs/$(am__dirstamp) @rm -f lfs/test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lfs_test_OBJECTS) $(lfs_test_LDADD) $(LIBS) +v1-to-v2-wrapped-passphrase/$(am__dirstamp): + @$(MKDIR_P) v1-to-v2-wrapped-passphrase + @: > v1-to-v2-wrapped-passphrase/$(am__dirstamp) +v1-to-v2-wrapped-passphrase/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) v1-to-v2-wrapped-passphrase/$(DEPDIR) + @: > v1-to-v2-wrapped-passphrase/$(DEPDIR)/$(am__dirstamp) +v1-to-v2-wrapped-passphrase/test.$(OBJEXT): \ + v1-to-v2-wrapped-passphrase/$(am__dirstamp) \ + v1-to-v2-wrapped-passphrase/$(DEPDIR)/$(am__dirstamp) + +v1-to-v2-wrapped-passphrase/test$(EXEEXT): $(v1_to_v2_wrapped_passphrase_test_OBJECTS) $(v1_to_v2_wrapped_passphrase_test_DEPENDENCIES) $(EXTRA_v1_to_v2_wrapped_passphrase_test_DEPENDENCIES) v1-to-v2-wrapped-passphrase/$(am__dirstamp) + @rm -f v1-to-v2-wrapped-passphrase/test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(v1_to_v2_wrapped_passphrase_test_OBJECTS) $(v1_to_v2_wrapped_passphrase_test_LDADD) $(LIBS) verify-passphrase-sig/$(am__dirstamp): @$(MKDIR_P) verify-passphrase-sig @: > verify-passphrase-sig/$(am__dirstamp) @@ -699,6 +722,7 @@ wrap-unwrap/test$(EXEEXT): $(wrap_unwrap_test_OBJECTS) $(wrap_unwrap_test_DEPEND mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f lfs/*.$(OBJEXT) + -rm -f v1-to-v2-wrapped-passphrase/*.$(OBJEXT) -rm -f verify-passphrase-sig/*.$(OBJEXT) -rm -f wrap-unwrap/*.$(OBJEXT) @@ -706,6 +730,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@lfs/$(DEPDIR)/test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@v1-to-v2-wrapped-passphrase/$(DEPDIR)/test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@verify-passphrase-sig/$(DEPDIR)/test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@wrap-unwrap/$(DEPDIR)/test.Po@am__quote@ @@ -739,6 +764,7 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -rm -rf lfs/.libs lfs/_libs + -rm -rf v1-to-v2-wrapped-passphrase/.libs v1-to-v2-wrapped-passphrase/_libs -rm -rf verify-passphrase-sig/.libs verify-passphrase-sig/_libs -rm -rf wrap-unwrap/.libs wrap-unwrap/_libs @@ -949,6 +975,20 @@ verify-passphrase-sig.sh.log: verify-passphrase-sig.sh --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +wrap-unwrap.sh.log: wrap-unwrap.sh + @p='wrap-unwrap.sh'; \ + b='wrap-unwrap.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +v1-to-v2-wrapped-passphrase.sh.log: v1-to-v2-wrapped-passphrase.sh + @p='v1-to-v2-wrapped-passphrase.sh'; \ + b='v1-to-v2-wrapped-passphrase.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ @@ -1032,6 +1072,8 @@ distclean-generic: -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f lfs/$(DEPDIR)/$(am__dirstamp) -rm -f lfs/$(am__dirstamp) + -rm -f v1-to-v2-wrapped-passphrase/$(DEPDIR)/$(am__dirstamp) + -rm -f v1-to-v2-wrapped-passphrase/$(am__dirstamp) -rm -f verify-passphrase-sig/$(DEPDIR)/$(am__dirstamp) -rm -f verify-passphrase-sig/$(am__dirstamp) -rm -f wrap-unwrap/$(DEPDIR)/$(am__dirstamp) @@ -1046,7 +1088,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am - -rm -rf lfs/$(DEPDIR) verify-passphrase-sig/$(DEPDIR) wrap-unwrap/$(DEPDIR) + -rm -rf lfs/$(DEPDIR) v1-to-v2-wrapped-passphrase/$(DEPDIR) verify-passphrase-sig/$(DEPDIR) wrap-unwrap/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1092,7 +1134,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf lfs/$(DEPDIR) verify-passphrase-sig/$(DEPDIR) wrap-unwrap/$(DEPDIR) + -rm -rf lfs/$(DEPDIR) v1-to-v2-wrapped-passphrase/$(DEPDIR) verify-passphrase-sig/$(DEPDIR) wrap-unwrap/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/tests/userspace/tests.rc b/tests/userspace/tests.rc index 326523d..a0e0987 100644 --- a/tests/userspace/tests.rc +++ b/tests/userspace/tests.rc @@ -1 +1 @@ -safe="lfs.sh verify-passphrase-sig.sh wrap-unwrap.sh" +safe="lfs.sh verify-passphrase-sig.sh wrap-unwrap.sh v1-to-v2-wrapped-passphrase.sh" diff --git a/tests/userspace/v1-to-v2-wrapped-passphrase.sh b/tests/userspace/v1-to-v2-wrapped-passphrase.sh new file mode 100755 index 0000000..26dd17a --- /dev/null +++ b/tests/userspace/v1-to-v2-wrapped-passphrase.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# +# v1-to-v2-wrapped-passphrase.sh: Verify that v1 wrapped passphrase files can +# be unwrapped and then rewrapped as v2 files. +# Author: Tyler Hicks <tyhicks@canonical.com> +# +# Copyright (C) 2015 Canonical Ltd. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation version 2 +# of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +test_script_dir=$(dirname $0) +rc=1 + +. ${test_script_dir}/../lib/etl_funcs.sh + +test_cleanup() +{ + etl_remove_test_dir $test_dir + exit $rc +} +trap test_cleanup 0 1 2 3 15 + +do_test() +{ + ${test_script_dir}/v1-to-v2-wrapped-passphrase/test "$@" + rc=$? + if [ "$rc" -ne 0 ]; then + exit + fi +} + +test_dir_parent="$TMPDIR" +if [ -z "$test_dir_parent"]; then + test_dir_parent="/tmp" +fi + +test_dir=$(etl_create_test_dir "$test_dir_parent") || exit +cp "${test_script_dir}/v1-to-v2-wrapped-passphrase/wp"* "$test_dir" + +do_test "${test_dir}/wp01" "This is test #1" "Wrapping pass" "0011223344556677" + +do_test "${test_dir}/wp02" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "0011223344556677" + +do_test "${test_dir}/wp03" "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" "5a175a175a175a17" + +do_test "${test_dir}/wp04" "!" "*" "0011223344556677" + +do_test "${test_dir}/wp05" "!" "*" "0123456789abcdef" + +rc=0 +exit diff --git a/tests/userspace/v1-to-v2-wrapped-passphrase/test.c b/tests/userspace/v1-to-v2-wrapped-passphrase/test.c new file mode 100644 index 0000000..bd8e512 --- /dev/null +++ b/tests/userspace/v1-to-v2-wrapped-passphrase/test.c @@ -0,0 +1,189 @@ +/** + * test.c: Verify the migration from version 1 to version 2 wrapped-passphrase + * files + * Author: Tyler Hicks <tyhicks@canonical.com> + * + * Copyright (C) 2015 Canonical, Ltd. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA + */ + +#include <errno.h> +#include <stdio.h> +#include <string.h> +#include "../../src/include/ecryptfs.h" + +#define ECRYPTFS_MAX_KEY_HEX_BYTES (ECRYPTFS_MAX_KEY_BYTES * 2) + +#define NEW_WRAPPING_PASSPHRASE "The *new* eCryptfs wrapping passphrase." + +static void usage(const char *name) +{ + fprintf(stderr, + "%s FILENAME EXPECTED_PASS WRAPPING_PASS WRAPPING_SALT_HEX\n", + name); +} + +/** + * Returns 0 if the unwrap operation resulted in the expected decrypted + * passphrase + */ +static int verify_unwrap(char *expected_decrypted_passphrase, char *filename, + char *wrapping_passphrase, char *wrapping_salt) +{ + char decrypted_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES + 1]; + int rc; + + memset(decrypted_passphrase, 0, sizeof(decrypted_passphrase)); + + rc = ecryptfs_unwrap_passphrase(decrypted_passphrase, filename, + wrapping_passphrase, wrapping_salt); + if (rc) + return 1; + + if (strcmp(decrypted_passphrase, expected_decrypted_passphrase)) + return 1; + + return 0; +} + +/** + * Returns 0 if the *invalid* unwrap operations always fail + */ +static int verify_bad_unwrap(char *expected_decrypted_passphrase, char *filename, + char *wrapping_passphrase, char *wrapping_salt) +{ + char *last; + int rc; + + /* Increment first char in the wrapping_passphrase and verify that the + * unwrapping operation fails */ + wrapping_passphrase[0]++; + rc = verify_unwrap(expected_decrypted_passphrase, filename, + wrapping_passphrase, wrapping_salt); + wrapping_passphrase[0]--; + if (!rc) + return 1; + + /* Increment last char in the wrapping_passphrase and verify that the + * unwrapping operation fails */ + last = wrapping_passphrase + (strlen(wrapping_passphrase) - 1); + (*last)++; + rc = verify_unwrap(expected_decrypted_passphrase, filename, + wrapping_passphrase, wrapping_salt); + (*last)--; + if (!rc) + return 1; + + /* Perform a one's complement on the first char in the salt and verify + * that the unwrapping operation fails */ + wrapping_salt[0] = ~wrapping_salt[0]; + rc = verify_unwrap(expected_decrypted_passphrase, filename, + wrapping_passphrase, wrapping_salt); + wrapping_salt[0] = ~wrapping_salt[0]; + if (!rc) + return 1; + + /* Perform a one's complement on the last char in the salt and verify + * that the unwrapping operation fails */ + last = wrapping_salt + (ECRYPTFS_SALT_SIZE - 1); + *last = ~(*last); + rc = verify_unwrap(expected_decrypted_passphrase, filename, + wrapping_passphrase, wrapping_salt); + *last = ~(*last); + if (!rc) + return 1; + + return 0; +} + +static int do_rewrap(char *filename, char *old_wrapping_passphrase, + char *old_wrapping_salt, char *new_wrapping_passphrase) +{ + char decrypted_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES + 1]; + uint8_t version = 0; + int rc; + + memset(decrypted_passphrase, 0, sizeof(decrypted_passphrase)); + + rc = ecryptfs_unwrap_passphrase(decrypted_passphrase, filename, + old_wrapping_passphrase, + old_wrapping_salt); + if (rc) + return 1; + + rc = ecryptfs_wrap_passphrase(filename, new_wrapping_passphrase, NULL, + decrypted_passphrase); + if (rc) + return 1; + + rc = __ecryptfs_detect_wrapped_passphrase_file_version(filename, + &version); + if (version != 2) + return 1; + + return 0; +} + +int main(int argc, char *argv[]) +{ + char wrapping_salt[ECRYPTFS_SALT_SIZE]; + char *expected_decrypted_passphrase, *filename, *wrapping_passphrase, + *wrapping_salt_hex; + int rc; + + if (argc != 5) { + usage(argv[0]); + return EINVAL; + } + + filename = argv[1]; + expected_decrypted_passphrase = argv[2]; + wrapping_passphrase = argv[3]; + wrapping_salt_hex = argv[4]; + + if (strlen(expected_decrypted_passphrase) > ECRYPTFS_MAX_PASSPHRASE_BYTES || + strlen(wrapping_passphrase) > ECRYPTFS_MAX_PASSPHRASE_BYTES || + strlen(wrapping_salt_hex) != ECRYPTFS_SALT_SIZE_HEX) { + usage(argv[0]); + return EINVAL; + } + + from_hex(wrapping_salt, wrapping_salt_hex, ECRYPTFS_SALT_SIZE); + + rc = verify_unwrap(expected_decrypted_passphrase, filename, + wrapping_passphrase, wrapping_salt); + if (rc) + return 1; + + rc = verify_bad_unwrap(expected_decrypted_passphrase, filename, + wrapping_passphrase, wrapping_salt); + if (rc) + return 2; + + rc = do_rewrap(filename, wrapping_passphrase, wrapping_salt, + NEW_WRAPPING_PASSPHRASE); + if (rc) + return 3; + + rc = verify_unwrap(expected_decrypted_passphrase, filename, + NEW_WRAPPING_PASSPHRASE, NULL); + if (rc) + return 4; + + return 0; +} + diff --git a/tests/userspace/wrap-unwrap.sh b/tests/userspace/wrap-unwrap.sh index f678cac..332834e 100755 --- a/tests/userspace/wrap-unwrap.sh +++ b/tests/userspace/wrap-unwrap.sh @@ -32,7 +32,12 @@ test_cleanup() } trap test_cleanup 0 1 2 3 15 -test_dir=$(etl_create_test_dir) || exit +test_dir_parent="$TMPDIR" +if [ -z "$test_dir_parent"]; then + test_dir_parent="/tmp" +fi + +test_dir=$(etl_create_test_dir "$test_dir_parent") || exit path="${test_dir}/foo" ${test_script_dir}/wrap-unwrap/test ${path} |