diff -Nru cifs-utils-6.5/aclocal/idmap.m4 cifs-utils-6.6/aclocal/idmap.m4 --- cifs-utils-6.5/aclocal/idmap.m4 2016-02-22 09:31:25.000000000 -0600 +++ cifs-utils-6.6/aclocal/idmap.m4 2016-09-01 20:06:33.000000000 -0500 @@ -19,7 +19,7 @@ ]) fi -if test $enable_cifsacl != "no" -o $enable_cifsacl != "no"; then +if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then ac_wbc_save_LDFLAGS="$LDFLAGS" ac_wbc_save_LIBS="$LIBS" LDFLAGS="$LDFLAGS $WBCLIENT_LIBS" diff -Nru cifs-utils-6.5/aclocal.m4 cifs-utils-6.6/aclocal.m4 --- cifs-utils-6.5/aclocal.m4 2016-02-22 10:05:49.000000000 -0600 +++ cifs-utils-6.6/aclocal.m4 2016-09-01 20:08:28.000000000 -0500 @@ -61,32 +61,63 @@ fi ]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant . -# -# 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. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29) +dnl +dnl Copyright © 2004 Scott James Remnant . +dnl Copyright © 2012-2015 Dan Nicholson +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -108,18 +139,19 @@ PKG_CONFIG="" fi fi[]dnl -])# PKG_PROG_PKG_CONFIG +])dnl PKG_PROG_PKG_CONFIG -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -129,8 +161,10 @@ $3])dnl fi]) -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" @@ -142,10 +176,11 @@ else pkg_failed=untried fi[]dnl -])# _PKG_CONFIG +])dnl _PKG_CONFIG -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -153,19 +188,17 @@ else _pkg_short_errors_supported=no fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED +])dnl _PKG_SHORT_ERRORS_SUPPORTED -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl @@ -219,16 +252,40 @@ AC_MSG_RESULT([yes]) $3 fi[]dnl -])# PKG_CHECK_MODULES +])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. +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -239,16 +296,18 @@ AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_INSTALLDIR +])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. +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -259,13 +318,15 @@ AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -]) dnl PKG_NOARCH_INSTALLDIR +])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. +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl 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 @@ -274,7 +335,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl -])# PKG_CHECK_VAR +])dnl PKG_CHECK_VAR # Copyright (C) 2002-2014 Free Software Foundation, Inc. # diff -Nru cifs-utils-6.5/autom4te.cache/output.0 cifs-utils-6.6/autom4te.cache/output.0 --- cifs-utils-6.5/autom4te.cache/output.0 2016-02-22 10:05:49.000000000 -0600 +++ cifs-utils-6.6/autom4te.cache/output.0 2016-09-01 20:08:28.000000000 -0500 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for cifs-utils 6.5. +@%:@ Generated by GNU Autoconf 2.69 for cifs-utils 6.6. @%:@ @%:@ Report bugs to . @%:@ @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='cifs-utils' PACKAGE_TARNAME='cifs-utils' -PACKAGE_VERSION='6.5' -PACKAGE_STRING='cifs-utils 6.5' +PACKAGE_VERSION='6.6' +PACKAGE_STRING='cifs-utils 6.6' PACKAGE_BUGREPORT='linux-cifs@vger.kernel.org' PACKAGE_URL='https://wiki.samba.org/index.php/LinuxCIFS_utils' @@ -1319,7 +1319,7 @@ # 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 cifs-utils 6.5 to adapt to many kinds of systems. +\`configure' configures cifs-utils 6.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1389,7 +1389,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cifs-utils 6.5:";; + short | recursive ) echo "Configuration of cifs-utils 6.6:";; esac cat <<\_ACEOF @@ -1514,7 +1514,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cifs-utils configure 6.5 +cifs-utils configure 6.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1983,7 +1983,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cifs-utils $as_me 6.5, which was +It was created by cifs-utils $as_me 6.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2853,7 +2853,7 @@ # Define the identity of the package. PACKAGE='cifs-utils' - VERSION='6.5' + VERSION='6.6' cat >>confdefs.h <<_ACEOF @@ -5729,7 +5729,7 @@ fi fi -if test $enable_cifsacl != "no" -o $enable_cifsacl != "no"; then +if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then ac_wbc_save_LDFLAGS="$LDFLAGS" ac_wbc_save_LIBS="$LIBS" LDFLAGS="$LDFLAGS $WBCLIENT_LIBS" @@ -6786,7 +6786,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cifs-utils $as_me 6.5, which was +This file was extended by cifs-utils $as_me 6.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6853,7 +6853,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -cifs-utils config.status 6.5 +cifs-utils config.status 6.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru cifs-utils-6.5/autom4te.cache/output.1 cifs-utils-6.6/autom4te.cache/output.1 --- cifs-utils-6.5/autom4te.cache/output.1 2016-02-22 10:05:50.000000000 -0600 +++ cifs-utils-6.6/autom4te.cache/output.1 2016-09-01 20:08:30.000000000 -0500 @@ -1,6 +1,6 @@ @%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.69 for cifs-utils 6.5. +@%:@ Generated by GNU Autoconf 2.69 for cifs-utils 6.6. @%:@ @%:@ Report bugs to . @%:@ @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='cifs-utils' PACKAGE_TARNAME='cifs-utils' -PACKAGE_VERSION='6.5' -PACKAGE_STRING='cifs-utils 6.5' +PACKAGE_VERSION='6.6' +PACKAGE_STRING='cifs-utils 6.6' PACKAGE_BUGREPORT='linux-cifs@vger.kernel.org' PACKAGE_URL='https://wiki.samba.org/index.php/LinuxCIFS_utils' @@ -1319,7 +1319,7 @@ # 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 cifs-utils 6.5 to adapt to many kinds of systems. +\`configure' configures cifs-utils 6.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1389,7 +1389,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cifs-utils 6.5:";; + short | recursive ) echo "Configuration of cifs-utils 6.6:";; esac cat <<\_ACEOF @@ -1514,7 +1514,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cifs-utils configure 6.5 +cifs-utils configure 6.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1983,7 +1983,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cifs-utils $as_me 6.5, which was +It was created by cifs-utils $as_me 6.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2853,7 +2853,7 @@ # Define the identity of the package. PACKAGE='cifs-utils' - VERSION='6.5' + VERSION='6.6' cat >>confdefs.h <<_ACEOF @@ -5729,7 +5729,7 @@ fi fi -if test $enable_cifsacl != "no" -o $enable_cifsacl != "no"; then +if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then ac_wbc_save_LDFLAGS="$LDFLAGS" ac_wbc_save_LIBS="$LIBS" LDFLAGS="$LDFLAGS $WBCLIENT_LIBS" @@ -6786,7 +6786,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cifs-utils $as_me 6.5, which was +This file was extended by cifs-utils $as_me 6.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6853,7 +6853,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -cifs-utils config.status 6.5 +cifs-utils config.status 6.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru cifs-utils-6.5/autom4te.cache/requests cifs-utils-6.6/autom4te.cache/requests --- cifs-utils-6.5/autom4te.cache/requests 2016-02-22 10:05:50.000000000 -0600 +++ cifs-utils-6.6/autom4te.cache/requests 2016-09-01 20:08:30.000000000 -0500 @@ -38,58 +38,59 @@ 'configure.ac' ], { + 'include' => 1, + 'PKG_CHECK_EXISTS' => 1, + 'LIBCAP_NG_PATH' => 1, + '_AM_PROG_CC_C_O' => 1, + 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'AC_CONFIG_MACRO_DIR_TRACE' => 1, '_AM_SET_OPTION' => 1, - 'AM_CONDITIONAL' => 1, - 'PKG_CHECK_VAR' => 1, - 'AM_SILENT_RULES' => 1, - 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AC_DEFUN' => 1, - '_AC_AM_CONFIG_HEADER_HOOK' => 1, - 'AM_SANITY_CHECK' => 1, - 'AM_PROG_INSTALL_SH' => 1, 'PKG_PROG_PKG_CONFIG' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'PKG_CHECK_MODULES' => 1, - 'AC_TEST_WBCHL' => 1, - 'AC_TEST_WBC_IDMAP_BOTH' => 1, '_AM_DEPENDENCIES' => 1, - 'PKG_INSTALLDIR' => 1, + 'm4_pattern_forbid' => 1, + 'AM_RUN_LOG' => 1, + '_AM_SUBST_NOTMAKE' => 1, 'AM_PROG_INSTALL_STRIP' => 1, - 'PKG_CHECK_EXISTS' => 1, - 'AM_MISSING_HAS_RUN' => 1, - '_AM_CONFIG_MACRO_DIRS' => 1, + '_AM_SET_OPTIONS' => 1, + '_AM_MANGLE_OPTION' => 1, + 'PKG_NOARCH_INSTALLDIR' => 1, + 'AM_PROG_CC_C_O' => 1, 'AM_SET_LEADING_DOT' => 1, - '_AM_SUBST_NOTMAKE' => 1, + 'PKG_CHECK_VAR' => 1, + 'PKG_CHECK_MODULES_STATIC' => 1, + 'AC_LIBCAP' => 1, + 'AM_MISSING_PROG' => 1, + '_m4_warn' => 1, '_AM_PROG_TAR' => 1, - 'PKG_NOARCH_INSTALLDIR' => 1, - 'LIBCAP_NG_PATH' => 1, - 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, 'AM_INIT_AUTOMAKE' => 1, - 'AM_RUN_LOG' => 1, - 'AC_CONFIG_MACRO_DIR_TRACE' => 1, + 'PKG_CHECK_MODULES' => 1, + 'AC_CONFIG_MACRO_DIR' => 1, + '_AM_CONFIG_MACRO_DIRS' => 1, + '_AC_AM_CONFIG_HEADER_HOOK' => 1, + 'PKG_INSTALLDIR' => 1, + 'AM_DEP_TRACK' => 1, + 'AM_MAKE_INCLUDE' => 1, + 'AC_TEST_WBCHL' => 1, + 'AC_TEST_WBC_IDMAP_BOTH' => 1, + 'AC_DEFUN' => 1, + 'AM_SANITY_CHECK' => 1, + 'AU_DEFUN' => 1, + 'AM_CONDITIONAL' => 1, 'AM_AUX_DIR_EXPAND' => 1, - 'AM_SET_DEPDIR' => 1, - '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'AM_MISSING_PROG' => 1, + 'AM_PROG_INSTALL_SH' => 1, '_AM_IF_OPTION' => 1, - 'AM_DEP_TRACK' => 1, - '_AM_MANGLE_OPTION' => 1, - '_m4_warn' => 1, - '_AM_SET_OPTIONS' => 1, - 'AC_CONFIG_MACRO_DIR' => 1, + 'AM_AUTOMAKE_VERSION' => 1, + 'AM_SET_DEPDIR' => 1, + '_PKG_SHORT_ERRORS_SUPPORTED' => 1, 'm4_pattern_allow' => 1, - 'AU_DEFUN' => 1, - 'include' => 1, - 'm4_include' => 1, - 'AM_SUBST_NOTMAKE' => 1, - 'AM_PROG_CC_C_O' => 1, + 'AM_MISSING_HAS_RUN' => 1, '_AM_AUTOCONF_VERSION' => 1, - 'AC_LIBCAP' => 1, - '_AM_PROG_CC_C_O' => 1, - '_PKG_SHORT_ERRORS_SUPPORTED' => 1, + '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'AM_SILENT_RULES' => 1, + 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, + 'm4_include' => 1, 'AC_DEFUN_ONCE' => 1, - 'm4_pattern_forbid' => 1, - 'AM_MAKE_INCLUDE' => 1 + 'AM_SUBST_NOTMAKE' => 1 } ], 'Autom4te::Request' ), bless( [ @@ -104,65 +105,65 @@ 'configure.ac' ], { - 'AM_EXTRA_RECURSIVE_TARGETS' => 1, - 'AM_PROG_CXX_C_O' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_PATH_GUILE' => 1, - 'AM_XGETTEXT_OPTION' => 1, - 'm4_pattern_forbid' => 1, - 'AC_CONFIG_AUX_DIR' => 1, + 'AM_GNU_GETTEXT' => 1, + 'AC_SUBST' => 1, 'LT_CONFIG_LTDL_DIR' => 1, - 'm4_include' => 1, - 'AM_PROG_MKDIR_P' => 1, 'AM_PROG_CC_C_O' => 1, - 'AC_SUBST_TRACE' => 1, - 'AM_PROG_F77_C_O' => 1, - 'AC_CONFIG_LINKS' => 1, - 'AC_CONFIG_HEADERS' => 1, - '_AM_MAKEFILE_INCLUDE' => 1, + 'AM_PROG_AR' => 1, + 'AC_LIBSOURCE' => 1, + 'AC_PROG_LIBTOOL' => 1, '_m4_warn' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, - 'm4_pattern_allow' => 1, - '_AM_COND_ENDIF' => 1, - 'include' => 1, - 'AC_REQUIRE_AUX_FILE' => 1, + 'AM_PROG_FC_C_O' => 1, + 'AM_MAINTAINER_MODE' => 1, + 'AC_FC_PP_SRCEXT' => 1, + 'AM_ENABLE_MULTILIB' => 1, + 'AM_INIT_AUTOMAKE' => 1, + 'AM_PROG_CXX_C_O' => 1, 'LT_SUPPORTED_TAG' => 1, - 'AM_PROG_MOC' => 1, + 'sinclude' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AC_INIT' => 1, - '_AM_COND_IF' => 1, - 'AC_FC_SRCEXT' => 1, - 'AM_PROG_AR' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_SUBST' => 1, + 'include' => 1, + 'AC_CANONICAL_HOST' => 1, 'AC_CONFIG_FILES' => 1, - 'AM_MAKEFILE_INCLUDE' => 1, - 'AM_PROG_FC_C_O' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'AM_ENABLE_MULTILIB' => 1, + 'AM_XGETTEXT_OPTION' => 1, + 'AC_CONFIG_AUX_DIR' => 1, '_LT_AC_TAGCONFIG' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - 'LT_INIT' => 1, - 'AC_FC_PP_SRCEXT' => 1, + 'm4_pattern_forbid' => 1, '_AM_SUBST_NOTMAKE' => 1, - 'sinclude' => 1, + 'AC_CANONICAL_BUILD' => 1, + 'AM_MAKEFILE_INCLUDE' => 1, + 'AC_CANONICAL_SYSTEM' => 1, + 'm4_pattern_allow' => 1, + 'AC_INIT' => 1, 'AM_AUTOMAKE_VERSION' => 1, - 'm4_sinclude' => 1, - '_AM_COND_ELSE' => 1, - 'AC_LIBSOURCE' => 1, - 'AC_FC_FREEFORM' => 1, - 'AC_CANONICAL_TARGET' => 1, + '_AM_MAKEFILE_INCLUDE' => 1, + 'AC_FC_PP_DEFINE' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AM_CONDITIONAL' => 1, - 'AH_OUTPUT' => 1, - 'AC_CANONICAL_HOST' => 1, - 'AM_NLS' => 1, - 'AM_MAINTAINER_MODE' => 1, + '_AM_COND_ENDIF' => 1, 'AM_SILENT_RULES' => 1, 'AM_POT_TOOLS' => 1, - 'AC_FC_PP_DEFINE' => 1, - 'AM_GNU_GETTEXT' => 1 + 'AC_FC_SRCEXT' => 1, + 'm4_sinclude' => 1, + 'LT_INIT' => 1, + 'AC_CONFIG_LINKS' => 1, + 'AM_PATH_GUILE' => 1, + 'AC_FC_FREEFORM' => 1, + 'AC_REQUIRE_AUX_FILE' => 1, + 'AM_NLS' => 1, + '_AM_COND_ELSE' => 1, + 'AC_SUBST_TRACE' => 1, + 'AH_OUTPUT' => 1, + 'm4_include' => 1, + '_AM_COND_IF' => 1, + 'AM_PROG_MKDIR_P' => 1, + 'AM_PROG_MOC' => 1, + 'AC_CONFIG_HEADERS' => 1, + 'AM_EXTRA_RECURSIVE_TARGETS' => 1, + 'AM_PROG_F77_C_O' => 1, + 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AC_CONFIG_SUBDIRS' => 1, + 'AC_CANONICAL_TARGET' => 1, + 'AM_CONDITIONAL' => 1 } ], 'Autom4te::Request' ) ); diff -Nru cifs-utils-6.5/autom4te.cache/traces.0 cifs-utils-6.6/autom4te.cache/traces.0 --- cifs-utils-6.5/autom4te.cache/traces.0 2016-02-22 10:05:49.000000000 -0600 +++ cifs-utils-6.6/autom4te.cache/traces.0 2016-09-01 20:08:28.000000000 -0500 @@ -34,7 +34,7 @@ AC_MSG_RESULT(no) fi ]) -m4trace:/usr/share/aclocal/pkg.m4:27: -1- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4trace:/usr/share/aclocal/pkg.m4:58: -1- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) @@ -55,21 +55,21 @@ fi fi[]dnl ]) -m4trace:/usr/share/aclocal/pkg.m4:60: -1- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +m4trace:/usr/share/aclocal/pkg.m4:92: -1- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) -m4trace:/usr/share/aclocal/pkg.m4:86: -1- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +m4trace:/usr/share/aclocal/pkg.m4:121: -1- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ]) -m4trace:/usr/share/aclocal/pkg.m4:106: -1- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +m4trace:/usr/share/aclocal/pkg.m4:139: -1- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl @@ -122,7 +122,13 @@ $3 fi[]dnl ]) -m4trace:/usr/share/aclocal/pkg.m4:169: -1- AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4trace:/usr/share/aclocal/pkg.m4:208: -1- AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +]) +m4trace:/usr/share/aclocal/pkg.m4:226: -1- 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], @@ -132,7 +138,7 @@ m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) -m4trace:/usr/share/aclocal/pkg.m4:189: -1- AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4trace:/usr/share/aclocal/pkg.m4:248: -1- 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], @@ -142,7 +148,7 @@ m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) -m4trace:/usr/share/aclocal/pkg.m4:206: -1- AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +m4trace:/usr/share/aclocal/pkg.m4:267: -1- 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]) @@ -920,7 +926,7 @@ ]) fi -if test $enable_cifsacl != "no" -o $enable_cifsacl != "no"; then +if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then ac_wbc_save_LDFLAGS="$LDFLAGS" ac_wbc_save_LIBS="$LIBS" LDFLAGS="$LDFLAGS $WBCLIENT_LIBS" diff -Nru cifs-utils-6.5/autom4te.cache/traces.1 cifs-utils-6.6/autom4te.cache/traces.1 --- cifs-utils-6.5/autom4te.cache/traces.1 2016-02-22 10:05:50.000000000 -0600 +++ cifs-utils-6.6/autom4te.cache/traces.1 2016-09-01 20:08:30.000000000 -0500 @@ -1,6 +1,6 @@ -m4trace:aclocal.m4:1409: -1- m4_include([aclocal/idmap.m4]) -m4trace:aclocal.m4:1410: -1- m4_include([aclocal/libcap.m4]) -m4trace:configure.ac:4: -1- AC_INIT([cifs-utils], [6.5], [linux-cifs@vger.kernel.org], [cifs-utils], [https://wiki.samba.org/index.php/LinuxCIFS_utils]) +m4trace:aclocal.m4:1470: -1- m4_include([aclocal/idmap.m4]) +m4trace:aclocal.m4:1471: -1- m4_include([aclocal/libcap.m4]) +m4trace:configure.ac:4: -1- AC_INIT([cifs-utils], [6.6], [linux-cifs@vger.kernel.org], [cifs-utils], [https://wiki.samba.org/index.php/LinuxCIFS_utils]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) diff -Nru cifs-utils-6.5/cifs.upcall.c cifs-utils-6.6/cifs.upcall.c --- cifs-utils-6.5/cifs.upcall.c 2016-02-22 09:31:25.000000000 -0600 +++ cifs-utils-6.6/cifs.upcall.c 2016-09-01 20:06:33.000000000 -0500 @@ -52,13 +52,9 @@ #include "spnego.h" #include "cifs_spnego.h" -#define CIFS_DEFAULT_KRB5_DIR "/tmp" -#define CIFS_DEFAULT_KRB5_USER_DIR "/run/user/%U" -#define CIFS_DEFAULT_KRB5_PREFIX "krb5cc" +static krb5_context context; +static const char *prog = "cifs.upcall"; -#define MAX_CCNAME_LEN PATH_MAX + 5 - -static const char *prog = "cifs.upcall"; typedef enum _sectype { NONE = 0, KRB5, @@ -75,9 +71,7 @@ * @return pointer to the realm * */ - -static char *cifs_krb5_principal_get_realm(krb5_context context __attribute__ ((unused)), - krb5_principal principal) +static char *cifs_krb5_principal_get_realm(krb5_principal principal) { #ifdef HAVE_KRB5_PRINCIPAL_GET_REALM /* Heimdal */ return krb5_principal_get_realm(context, principal); @@ -108,26 +102,14 @@ #endif /* does the ccache have a valid TGT? */ -static time_t get_tgt_time(const char *ccname) +static time_t get_tgt_time(krb5_ccache ccache) { - krb5_context context; - krb5_ccache ccache; krb5_cc_cursor cur; krb5_creds creds; krb5_principal principal; time_t credtime = 0; char *realm = NULL; - if (krb5_init_context(&context)) { - syslog(LOG_DEBUG, "%s: unable to init krb5 context", __func__); - return 0; - } - - if (krb5_cc_resolve(context, ccname, &ccache)) { - syslog(LOG_DEBUG, "%s: unable to resolve krb5 cache", __func__); - goto err_cache; - } - if (krb5_cc_set_flags(context, ccache, 0)) { syslog(LOG_DEBUG, "%s: unable to set flags", __func__); goto err_cache; @@ -135,7 +117,7 @@ if (krb5_cc_get_principal(context, ccache, &principal)) { syslog(LOG_DEBUG, "%s: unable to get principal", __func__); - goto err_princ; + goto err_cache; } if (krb5_cc_start_seq_get(context, ccache, &cur)) { @@ -143,7 +125,7 @@ goto err_ccstart; } - if ((realm = cifs_krb5_principal_get_realm(context, principal)) == NULL) { + if ((realm = cifs_krb5_principal_get_realm(principal)) == NULL) { syslog(LOG_DEBUG, "%s: unable to get realm", __func__); goto err_ccstart; } @@ -168,42 +150,41 @@ krb5_cc_end_seq_get(context, ccache, &cur); err_ccstart: krb5_free_principal(context, principal); -err_princ: -#if defined(KRB5_TC_OPENCLOSE) - krb5_cc_set_flags(context, ccache, KRB5_TC_OPENCLOSE); -#endif - krb5_cc_close(context, ccache); err_cache: - krb5_free_context(context); return credtime; } -static int krb5cc_filter(const struct dirent *dirent) +static krb5_ccache +get_default_cc(void) { - /* subtract 1 for the null terminator */ - return !strncmp(dirent->d_name, CIFS_DEFAULT_KRB5_PREFIX, - sizeof(CIFS_DEFAULT_KRB5_PREFIX) - 1); + krb5_error_code ret; + krb5_ccache cc; + + ret = krb5_cc_default(context, &cc); + if (ret) { + syslog(LOG_DEBUG, "%s: krb5_cc_default returned %d", __func__, ret); + return NULL; + } + + if (!get_tgt_time(cc)) { + krb5_cc_close(context, cc); + cc = NULL; + } + return cc; } -static char * + +static krb5_ccache init_cc_from_keytab(const char *keytab_name, const char *user) { - krb5_context context = NULL; krb5_error_code ret; krb5_creds my_creds; krb5_keytab keytab = NULL; krb5_principal me = NULL; krb5_ccache cc = NULL; - char *ccname = NULL; memset((char *) &my_creds, 0, sizeof(my_creds)); - ret = krb5_init_context(&context); - if (ret) { - syslog(LOG_DEBUG, "krb5_init_context: %d", (int)ret); - goto icfk_cleanup; - } - if (keytab_name) ret = krb5_kt_resolve(context, keytab_name, &keytab); else @@ -242,174 +223,46 @@ } ret = krb5_cc_store_cred(context, cc, &my_creds); - if (ret) + if (ret) { syslog(LOG_DEBUG, "krb5_cc_store_cred: %d", (int)ret); - - ccname = strdup(krb5_cc_default_name(context)); - if (ccname == NULL) - syslog(LOG_ERR, "Unable to allocate memory"); -icfk_cleanup: + goto icfk_cleanup; + } +out: my_creds.client = (krb5_principal)0; krb5_free_cred_contents(context, &my_creds); if (me) krb5_free_principal(context, me); - if (cc) - krb5_cc_close(context, cc); if (keytab) krb5_kt_close(context, keytab); - if (context) - krb5_free_context(context); - return ccname; -} - -/* resolve a pattern to an actual directory path */ -static char *resolve_krb5_dir(const char *pattern, uid_t uid) -{ - char name[MAX_CCNAME_LEN]; - int i; - size_t j; - for (i = 0, j = 0; (pattern[i] != '\0') && (j < sizeof(name)); i++) { - switch (pattern[i]) { - case '%': - switch (pattern[i + 1]) { - case '%': - name[j++] = pattern[i]; - i++; - break; - case 'U': - j += snprintf(name + j, sizeof(name) - j, - "%lu", (unsigned long) uid); - i++; - break; - } - break; - default: - name[j++] = pattern[i]; - break; - } - } - if ((j > 0) && (j < sizeof(name))) - return strndup(name, MAX_CCNAME_LEN); - else - return NULL; -} - -/* search for a credcache that looks like a likely candidate */ -static char *find_krb5_cc(const char *dirname, uid_t uid, - char **best_cache, time_t *best_time) -{ - struct dirent **namelist; - struct stat sbuf; - char ccname[MAX_CCNAME_LEN], *credpath; - int i, n; - time_t cred_time; - - n = scandir(dirname, &namelist, krb5cc_filter, NULL); - if (n < 0) { - syslog(LOG_DEBUG, "%s: scandir error on directory '%s': %s", - __func__, dirname, strerror(errno)); - return NULL; - } - - for (i = 0; i < n; i++) { - snprintf(ccname, sizeof(ccname), "FILE:%s/%s", dirname, - namelist[i]->d_name); - credpath = ccname + 5; - syslog(LOG_DEBUG, "%s: considering %s", __func__, credpath); - - if (lstat(credpath, &sbuf)) { - syslog(LOG_DEBUG, "%s: stat error on '%s': %s", - __func__, credpath, strerror(errno)); - free(namelist[i]); - continue; - } - if (sbuf.st_uid != uid) { - syslog(LOG_DEBUG, "%s: %s is owned by %u, not %u", - __func__, credpath, sbuf.st_uid, uid); - free(namelist[i]); - continue; - } - if (S_ISDIR(sbuf.st_mode)) { - snprintf(ccname, sizeof(ccname), "DIR:%s/%s", dirname, - namelist[i]->d_name); - credpath = ccname + 4; - } else - if (!S_ISREG(sbuf.st_mode)) { - syslog(LOG_DEBUG, "%s: %s is not a regular file", - __func__, credpath); - free(namelist[i]); - continue; - } - if (!(cred_time = get_tgt_time(ccname))) { - syslog(LOG_DEBUG, "%s: %s is not a valid credcache.", - __func__, ccname); - free(namelist[i]); - continue; - } - - if (cred_time <= *best_time) { - syslog(LOG_DEBUG, "%s: %s expires sooner than current " - "best.", __func__, ccname); - free(namelist[i]); - continue; - } - - syslog(LOG_DEBUG, "%s: %s is valid ccache", __func__, ccname); - free(*best_cache); - *best_cache = strndup(ccname, MAX_CCNAME_LEN); - *best_time = cred_time; - free(namelist[i]); + return cc; +icfk_cleanup: + if (cc) { + krb5_cc_close(context, cc); + cc = NULL; } - free(namelist); - - return *best_cache; + goto out; } static int -cifs_krb5_get_req(const char *host, const char *ccname, +cifs_krb5_get_req(const char *host, krb5_ccache ccache, DATA_BLOB * mechtoken, DATA_BLOB * sess_key) { krb5_error_code ret; krb5_keyblock *tokb; - krb5_context context; - krb5_ccache ccache; krb5_creds in_creds, *out_creds; krb5_data apreq_pkt, in_data; krb5_auth_context auth_context = NULL; #if defined(HAVE_KRB5_AUTH_CON_SETADDRS) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE) static const uint8_t gss_cksum[24] = { 0x10, 0x00, /* ... */}; #endif - - ret = krb5_init_context(&context); - if (ret) { - syslog(LOG_DEBUG, "%s: unable to init krb5 context", __func__); - return ret; - } - - if (ccname) { - ret = krb5_cc_resolve(context, ccname, &ccache); - if (ret) { - syslog(LOG_DEBUG, "%s: unable to resolve %s to ccache\n", - __func__, ccname); - goto out_free_context; - } - } else { - ret = krb5_cc_default(context, &ccache); - if (ret) { - syslog(LOG_DEBUG, "%s: krb5_cc_default: %d", - __func__, (int)ret); - goto out_free_context; - } - } - memset(&in_creds, 0, sizeof(in_creds)); ret = krb5_cc_get_principal(context, ccache, &in_creds.client); if (ret) { syslog(LOG_DEBUG, "%s: unable to get client principal name", __func__); - goto out_free_ccache; + return ret; } ret = krb5_sname_to_principal(context, host, "cifs", KRB5_NT_UNKNOWN, @@ -471,7 +324,6 @@ /* MIT krb5 < 1.7 is missing the prototype, but still has the symbol */ #if !HAVE_DECL_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE krb5_error_code krb5_auth_con_set_req_cksumtype( - krb5_context context, krb5_auth_context auth_context, krb5_cksumtype cksumtype); #endif @@ -510,13 +362,6 @@ krb5_free_creds(context, out_creds); out_free_principal: krb5_free_principal(context, in_creds.client); -out_free_ccache: -#if defined(KRB5_TC_OPENCLOSE) - krb5_cc_set_flags(context, ccache, KRB5_TC_OPENCLOSE); -#endif - krb5_cc_close(context, ccache); -out_free_context: - krb5_free_context(context); return ret; } @@ -542,7 +387,7 @@ */ static int handle_krb5_mech(const char *oid, const char *host, DATA_BLOB * secblob, - DATA_BLOB * sess_key, const char *ccname) + DATA_BLOB * sess_key, krb5_ccache ccache) { int retval; DATA_BLOB tkt, tkt_wrapped; @@ -550,7 +395,7 @@ syslog(LOG_DEBUG, "%s: getting service ticket for %s", __func__, host); /* get a kerberos ticket for the service and extract the session key */ - retval = cifs_krb5_get_req(host, ccname, &tkt, sess_key); + retval = cifs_krb5_get_req(host, ccache, &tkt, sess_key); if (retval) { syslog(LOG_DEBUG, "%s: failed to obtain service ticket (%d)", __func__, retval); @@ -841,13 +686,13 @@ unsigned int have; long rc = 1; int c, try_dns = 0, legacy_uid = 0; - char *buf, *ccdir = NULL, *ccname = NULL, *best_cache = NULL; + char *buf; char hostbuf[NI_MAXHOST], *host; struct decoded_args arg; const char *oid; uid_t uid; char *keytab_name = NULL; - time_t best_time = 0; + krb5_ccache ccache = NULL; hostbuf[0] = '\0'; memset(&arg, 0, sizeof(arg)); @@ -954,16 +799,22 @@ syslog(LOG_ERR, "setuid: %s", strerror(errno)); goto out; } - ccdir = resolve_krb5_dir(CIFS_DEFAULT_KRB5_USER_DIR, uid); - if (ccdir != NULL) - find_krb5_cc(ccdir, uid, &best_cache, &best_time); - ccname = find_krb5_cc(CIFS_DEFAULT_KRB5_DIR, uid, &best_cache, - &best_time); - SAFE_FREE(ccdir); + rc = krb5_init_context(&context); + if (rc) { + syslog(LOG_ERR, "unable to init krb5 context: %ld", rc); + goto out; + } + + ccache = get_default_cc(); /* Couldn't find credcache? Try to use keytab */ - if (ccname == NULL && arg.username != NULL) - ccname = init_cc_from_keytab(keytab_name, arg.username); + if (ccache == NULL && arg.username != NULL) + ccache = init_cc_from_keytab(keytab_name, arg.username); + + if (ccache == NULL) { + rc = 1; + goto out; + } host = arg.hostname; @@ -991,7 +842,7 @@ retry_new_hostname: lowercase_string(host); - rc = handle_krb5_mech(oid, host, &secblob, &sess_key, ccname); + rc = handle_krb5_mech(oid, host, &secblob, &sess_key, ccache); if (!rc) break; @@ -1036,7 +887,7 @@ break; } - rc = handle_krb5_mech(oid, fqdn, &secblob, &sess_key, ccname); + rc = handle_krb5_mech(oid, fqdn, &secblob, &sess_key, ccache); if (!rc) break; } @@ -1100,7 +951,10 @@ } data_blob_free(&secblob); data_blob_free(&sess_key); - SAFE_FREE(ccname); + if (ccache) + krb5_cc_close(context, ccache); + if (context) + krb5_free_context(context); SAFE_FREE(arg.hostname); SAFE_FREE(arg.ip); SAFE_FREE(arg.username); diff -Nru cifs-utils-6.5/configure cifs-utils-6.6/configure --- cifs-utils-6.5/configure 2016-02-22 10:05:49.000000000 -0600 +++ cifs-utils-6.6/configure 2016-09-01 20:08:29.000000000 -0500 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for cifs-utils 6.5. +# Generated by GNU Autoconf 2.69 for cifs-utils 6.6. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='cifs-utils' PACKAGE_TARNAME='cifs-utils' -PACKAGE_VERSION='6.5' -PACKAGE_STRING='cifs-utils 6.5' +PACKAGE_VERSION='6.6' +PACKAGE_STRING='cifs-utils 6.6' PACKAGE_BUGREPORT='linux-cifs@vger.kernel.org' PACKAGE_URL='https://wiki.samba.org/index.php/LinuxCIFS_utils' @@ -1319,7 +1319,7 @@ # 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 cifs-utils 6.5 to adapt to many kinds of systems. +\`configure' configures cifs-utils 6.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1389,7 +1389,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cifs-utils 6.5:";; + short | recursive ) echo "Configuration of cifs-utils 6.6:";; esac cat <<\_ACEOF @@ -1514,7 +1514,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cifs-utils configure 6.5 +cifs-utils configure 6.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1983,7 +1983,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cifs-utils $as_me 6.5, which was +It was created by cifs-utils $as_me 6.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2853,7 +2853,7 @@ # Define the identity of the package. PACKAGE='cifs-utils' - VERSION='6.5' + VERSION='6.6' cat >>confdefs.h <<_ACEOF @@ -5729,7 +5729,7 @@ fi fi -if test $enable_cifsacl != "no" -o $enable_cifsacl != "no"; then +if test $enable_cifsidmap != "no" -o $enable_cifsacl != "no"; then ac_wbc_save_LDFLAGS="$LDFLAGS" ac_wbc_save_LIBS="$LIBS" LDFLAGS="$LDFLAGS $WBCLIENT_LIBS" @@ -6786,7 +6786,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cifs-utils $as_me 6.5, which was +This file was extended by cifs-utils $as_me 6.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6853,7 +6853,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -cifs-utils config.status 6.5 +cifs-utils config.status 6.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru cifs-utils-6.5/configure.ac cifs-utils-6.6/configure.ac --- cifs-utils-6.5/configure.ac 2016-02-22 09:31:25.000000000 -0600 +++ cifs-utils-6.6/configure.ac 2016-09-01 20:06:33.000000000 -0500 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_INIT([cifs-utils],[6.5],[linux-cifs@vger.kernel.org],[cifs-utils],[https://wiki.samba.org/index.php/LinuxCIFS_utils]) +AC_INIT([cifs-utils],[6.6],[linux-cifs@vger.kernel.org],[cifs-utils],[https://wiki.samba.org/index.php/LinuxCIFS_utils]) AC_CONFIG_SRCDIR([replace.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile contrib/Makefile contrib/request-key.d/Makefile]) diff -Nru cifs-utils-6.5/debian/changelog cifs-utils-6.6/debian/changelog --- cifs-utils-6.5/debian/changelog 2016-05-12 13:35:13.000000000 -0500 +++ cifs-utils-6.6/debian/changelog 2016-05-03 12:30:11.000000000 -0500 @@ -1,3 +1,45 @@ +cifs-utils (2:6.6-5ubuntu1) UNRELEASED; urgency=low + + * Merge from Debian unstable. Remaining changes: (LP: #1660372) + - Modified debian/control to suggest keyutils per debian. + - debian/patches/stat_systemd-ask-password.patch: also check for + /bin/systemd-ask-password before trying to use systemd's tools. + + -- Dave Chiluk Tue, 03 May 2016 17:30:11 +0000 + +cifs-utils (2:6.6-5) unstable; urgency=low + + * Set architecture to linux-any. + + -- Jelmer Vernooij Sat, 07 Jan 2017 16:35:58 +0000 + +cifs-utils (2:6.6-4) unstable; urgency=medium + + * Add pam_cifscreds (Closes: #848140, LP: #1611816). Patch by David Mcbride + + -- Mathieu Parent Fri, 16 Dec 2016 05:22:12 +0100 + +cifs-utils (2:6.6-3) unstable; urgency=medium + + * Use correct idmapwb.so path in postinst/prerm (Closes: #848275) + + -- Mathieu Parent Fri, 16 Dec 2016 04:51:36 +0100 + +cifs-utils (2:6.6-2) unstable; urgency=medium + + * Add me to uploaders + * Create idmap-plugin symlink using update-alternatives (Closes: #845532). + Thanks Alessandro Larcher for reporting. + + -- Mathieu Parent Thu, 01 Dec 2016 23:21:42 +0100 + +cifs-utils (2:6.6-1) unstable; urgency=medium + + * Team upload + * New upstream release + + -- Mathieu Parent Fri, 09 Sep 2016 13:24:03 +0200 + cifs-utils (2:6.5-2ubuntu1) yakkety; urgency=low * Merge from Debian unstable. Remaining changes: (LP: #1581141) diff -Nru cifs-utils-6.5/debian/control cifs-utils-6.6/debian/control --- cifs-utils-6.5/debian/control 2016-05-12 13:29:15.000000000 -0500 +++ cifs-utils-6.6/debian/control 2016-05-03 12:30:11.000000000 -0500 @@ -3,13 +3,14 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian Samba Maintainers -Uploaders: Steve Langasek , Christian Perrier , Noèl Köthe , Jelmer Vernooij +Uploaders: Steve Langasek , Christian Perrier , Noèl Köthe , Jelmer Vernooij , Mathieu Parent Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev, libkeyutils-dev, - libcap-ng-dev [linux-any], + libcap-ng-dev, libkrb5-dev, + libpam0g-dev, libtalloc-dev (>= 1.2.0~git20080616), libwbclient-dev (>= 2:3.6.5-3) Standards-Version: 3.9.8 @@ -18,7 +19,7 @@ Vcs-Browser: https://anonscm.debian.org/cgit/pkg-samba/cifs-utils.git Package: cifs-utils -Architecture: any +Architecture: linux-any Depends: samba-common, ${shlibs:Depends}, ${misc:Depends} Replaces: smbfs (<< 2:4.0~rc1-1) Suggests: keyutils, smbclient, winbind diff -Nru cifs-utils-6.5/debian/dirs cifs-utils-6.6/debian/dirs --- cifs-utils-6.5/debian/dirs 1969-12-31 18:00:00.000000000 -0600 +++ cifs-utils-6.6/debian/dirs 2016-05-03 12:30:11.000000000 -0500 @@ -0,0 +1 @@ +/etc/cifs-utils diff -Nru cifs-utils-6.5/debian/postinst.in cifs-utils-6.6/debian/postinst.in --- cifs-utils-6.5/debian/postinst.in 1969-12-31 18:00:00.000000000 -0600 +++ cifs-utils-6.6/debian/postinst.in 2016-05-03 12:30:11.000000000 -0500 @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then + update-alternatives --install /etc/cifs-utils/idmap-plugin idmap-plugin /usr/lib/__DEB_HOST_MULTIARCH__/cifs-utils/idmapwb.so 40 \ + --slave /usr/share/man/man8/idmap-plugin.8.gz idmap-plugin.8.gz \ + /usr/share/man/man8/idmapwb.8.gz +fi + +#DEBHELPER# diff -Nru cifs-utils-6.5/debian/prerm.in cifs-utils-6.6/debian/prerm.in --- cifs-utils-6.5/debian/prerm.in 1969-12-31 18:00:00.000000000 -0600 +++ cifs-utils-6.6/debian/prerm.in 2016-05-03 12:30:11.000000000 -0500 @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +if [ "$1" != "upgrade" ]; then + update-alternatives --remove idmap-plugin /usr/lib/__DEB_HOST_MULTIARCH__/cifs-utils/idmapwb.so +fi + +#DEBHELPER# diff -Nru cifs-utils-6.5/debian/rules cifs-utils-6.6/debian/rules --- cifs-utils-6.5/debian/rules 2015-08-20 09:33:53.000000000 -0500 +++ cifs-utils-6.6/debian/rules 2016-05-03 12:30:11.000000000 -0500 @@ -1,11 +1,23 @@ #!/usr/bin/make -f + +DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + %: dh $@ --with=autotools_dev,autoreconf override_dh_auto_configure: - dh_auto_configure -- --enable-cifsidmap --enable-cifscreds --with-libcap-ng=auto + dh_auto_configure -- --enable-cifsidmap --enable-cifscreds --with-libcap-ng=auto --enable-pam --with-pamdir=/lib/$(DEB_HOST_MULTIARCH)/security + +override_dh_auto_install-indep: +override_dh_auto_install-arch: + dh_auto_install + sed -e 's/__DEB_HOST_MULTIARCH__/$(DEB_HOST_MULTIARCH)/g' debian/postinst + sed -e 's/__DEB_HOST_MULTIARCH__/$(DEB_HOST_MULTIARCH)/g' debian/prerm override_dh_fixperms: dh_fixperms chmod u+s debian/cifs-utils/sbin/mount.cifs +override_dh_auto_clean-indep: +override_dh_auto_clean-arch: + rm -f debian/postinst debian/prerm