Makefile.am | 1
Makefile.in | 71 ++++-----
aclocal.m4 | 209 ++++++++--------------------
config.h.in | 3
configure | 238 +++++++++++++++++---------------
dirsrvtests/create_test.py | 12 -
dirsrvtests/tickets/ticket48363_test.py | 206 +++++++++++++++++++++++++++
ldap/servers/slapd/features.c | 54 +++++++
ldap/servers/slapd/main.c | 5
ldap/servers/slapd/proto-slap.h | 5
ldap/servers/slapd/result.c | 31 ++--
ldap/servers/slapd/rootdse.c | 13 +
ldap/servers/slapd/slapi-plugin.h | 21 ++
13 files changed, 560 insertions(+), 309 deletions(-)
New commits:
commit 08c40e8a35a3611a0ac3ca30a86d40a17676ba84
Author: William Brown <firstyear(a)redhat.com>
Date: Fri Jan 8 09:47:44 2016 +1000
Ticket 48363 - Support for rfc3673 '+' to return operational attributes
Bug Description: We should support rfc3673 to return operational attributes
in searches.
Fix Description: We implement the '+' operator as per [0].
Additionally, we need to add "supportedFeatures" as per [1]. As a result,
we
have implemented both rfcs now.
This can be shown by adding '+' to any search.
We also add a test case that proves '+' works, that '*' works, and
specific
named attributes work also. Acis are also correctly respected by this change,
even for operational attributes.
[0]
https://tools.ietf.org/html/rfc3673
[1]
https://tools.ietf.org/html/rfc3674
https://fedorahosted.org/389/ticket/48363
Author: wibrown
Review by: nhosoi (Thanks! )
diff --git a/Makefile.am b/Makefile.am
index 9b19bd4..57b6b52 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -966,6 +966,7 @@ libslapd_la_SOURCES = ldap/servers/slapd/add.c \
ldap/servers/slapd/errormap.c \
ldap/servers/slapd/eventq.c \
ldap/servers/slapd/factory.c \
+ ldap/servers/slapd/features.c \
ldap/servers/slapd/fileio.c \
ldap/servers/slapd/filter.c \
ldap/servers/slapd/filtercmp.c \
diff --git a/Makefile.in b/Makefile.in
index 87ba2f9..a2042b9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,17 +20,7 @@
VPATH = @srcdir@
-am__is_gnu_make = { \
- if test -z '$(MAKELEVEL)'; then \
- false; \
- elif test -n '$(MAKE_HOST)'; then \
- true; \
- elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
- true; \
- else \
- false; \
- fi; \
-}
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n
'$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -103,6 +93,12 @@ noinst_PROGRAMS = makstrdb$(EXEEXT)
@SOLARIS_TRUE@am__append_2 = -lrt
@SOLARIS_TRUE@am__append_3 = ldap/servers/slapd/tools/ldclt/opCheck.c
subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/config.h.in $(top_srcdir)/rpm/389-ds-base.spec.in \
+ depcomp $(dist_man_MANS) $(dist_noinst_DATA) \
+ $(dist_noinst_HEADERS) $(serverinc_HEADERS) README compile \
+ config.guess config.sub install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -117,9 +113,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/systemd.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
- $(am__configure_deps) $(dist_noinst_DATA) \
- $(dist_noinst_HEADERS) $(serverinc_HEADERS) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
@@ -737,8 +730,9 @@ am__libslapd_la_SOURCES_DIST = ldap/servers/slapd/add.c \
ldap/servers/slapd/dse.c ldap/servers/slapd/dynalib.c \
ldap/servers/slapd/entry.c ldap/servers/slapd/entrywsi.c \
ldap/servers/slapd/errormap.c ldap/servers/slapd/eventq.c \
- ldap/servers/slapd/factory.c ldap/servers/slapd/fileio.c \
- ldap/servers/slapd/filter.c ldap/servers/slapd/filtercmp.c \
+ ldap/servers/slapd/factory.c ldap/servers/slapd/features.c \
+ ldap/servers/slapd/fileio.c ldap/servers/slapd/filter.c \
+ ldap/servers/slapd/filtercmp.c \
ldap/servers/slapd/filterentry.c \
ldap/servers/slapd/generation.c \
ldap/servers/slapd/getfilelist.c \
@@ -809,6 +803,7 @@ am_libslapd_la_OBJECTS = ldap/servers/slapd/libslapd_la-add.lo \
ldap/servers/slapd/libslapd_la-errormap.lo \
ldap/servers/slapd/libslapd_la-eventq.lo \
ldap/servers/slapd/libslapd_la-factory.lo \
+ ldap/servers/slapd/libslapd_la-features.lo \
ldap/servers/slapd/libslapd_la-fileio.lo \
ldap/servers/slapd/libslapd_la-filter.lo \
ldap/servers/slapd/libslapd_la-filtercmp.lo \
@@ -1260,10 +1255,6 @@ ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
AM_RECURSIVE_TARGETS = cscope
-am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
- $(srcdir)/config.h.in $(top_srcdir)/rpm/389-ds-base.spec.in \
- README compile config.guess config.sub depcomp install-sh \
- ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -2367,8 +2358,9 @@ libslapd_la_SOURCES = ldap/servers/slapd/add.c \
ldap/servers/slapd/dse.c ldap/servers/slapd/dynalib.c \
ldap/servers/slapd/entry.c ldap/servers/slapd/entrywsi.c \
ldap/servers/slapd/errormap.c ldap/servers/slapd/eventq.c \
- ldap/servers/slapd/factory.c ldap/servers/slapd/fileio.c \
- ldap/servers/slapd/filter.c ldap/servers/slapd/filtercmp.c \
+ ldap/servers/slapd/factory.c ldap/servers/slapd/features.c \
+ ldap/servers/slapd/fileio.c ldap/servers/slapd/filter.c \
+ ldap/servers/slapd/filtercmp.c \
ldap/servers/slapd/filterentry.c \
ldap/servers/slapd/generation.c \
ldap/servers/slapd/getfilelist.c \
@@ -3242,6 +3234,7 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am
$(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -3262,8 +3255,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @test -f $@ || rm -f stamp-h1
- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+ @if test ! -f $@; then rm -f stamp-h1; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -4585,6 +4578,9 @@ ldap/servers/slapd/libslapd_la-eventq.lo: \
ldap/servers/slapd/libslapd_la-factory.lo: \
ldap/servers/slapd/$(am__dirstamp) \
ldap/servers/slapd/$(DEPDIR)/$(am__dirstamp)
+ldap/servers/slapd/libslapd_la-features.lo: \
+ ldap/servers/slapd/$(am__dirstamp) \
+ ldap/servers/slapd/$(DEPDIR)/$(am__dirstamp)
ldap/servers/slapd/libslapd_la-fileio.lo: \
ldap/servers/slapd/$(am__dirstamp) \
ldap/servers/slapd/$(DEPDIR)/$(am__dirstamp)
@@ -5769,6 +5765,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@
@am__quote@ldap/servers/slapd/$(DEPDIR)/libslapd_la-errormap.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@ldap/servers/slapd/$(DEPDIR)/libslapd_la-eventq.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@ldap/servers/slapd/$(DEPDIR)/libslapd_la-factory.Plo(a)am__quote@
+@AMDEP_TRUE@@am__include@
@am__quote@ldap/servers/slapd/$(DEPDIR)/libslapd_la-features.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@ldap/servers/slapd/$(DEPDIR)/libslapd_la-fileio.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@ldap/servers/slapd/$(DEPDIR)/libslapd_la-filter.Plo(a)am__quote@
@AMDEP_TRUE@@am__include@
@am__quote@ldap/servers/slapd/$(DEPDIR)/libslapd_la-filtercmp.Plo(a)am__quote@
@@ -8037,6 +8034,13 @@ ldap/servers/slapd/libslapd_la-factory.lo:
ldap/servers/slapd/factory.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES)
$(INCLUDES) $(libslapd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o
ldap/servers/slapd/libslapd_la-factory.lo `test -f 'ldap/servers/slapd/factory.c'
|| echo '$(srcdir)/'`ldap/servers/slapd/factory.c
+ldap/servers/slapd/libslapd_la-features.lo: ldap/servers/slapd/features.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS)
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(libslapd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT
ldap/servers/slapd/libslapd_la-features.lo -MD -MP -MF
ldap/servers/slapd/$(DEPDIR)/libslapd_la-features.Tpo -c -o
ldap/servers/slapd/libslapd_la-features.lo `test -f
'ldap/servers/slapd/features.c' || echo
'$(srcdir)/'`ldap/servers/slapd/features.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv)
ldap/servers/slapd/$(DEPDIR)/libslapd_la-features.Tpo
ldap/servers/slapd/$(DEPDIR)/libslapd_la-features.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ldap/servers/slapd/features.c'
object='ldap/servers/slapd/libslapd_la-features.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES)
$(INCLUDES) $(libslapd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o
ldap/servers/slapd/libslapd_la-features.lo `test -f
'ldap/servers/slapd/features.c' || echo
'$(srcdir)/'`ldap/servers/slapd/features.c
+
ldap/servers/slapd/libslapd_la-fileio.lo: ldap/servers/slapd/fileio.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS)
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
$(libslapd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT
ldap/servers/slapd/libslapd_la-fileio.lo -MD -MP -MF
ldap/servers/slapd/$(DEPDIR)/libslapd_la-fileio.Tpo -c -o
ldap/servers/slapd/libslapd_la-fileio.lo `test -f 'ldap/servers/slapd/fileio.c' ||
echo '$(srcdir)/'`ldap/servers/slapd/fileio.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv)
ldap/servers/slapd/$(DEPDIR)/libslapd_la-fileio.Tpo
ldap/servers/slapd/$(DEPDIR)/libslapd_la-fileio.Plo
@@ -10349,16 +10353,10 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
- @echo WARNING: "Support for distribution archives compressed with" \
- "legacy program 'compress' is deprecated." >&2
- @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
- @echo WARNING: "Support for shar distribution archives 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)
@@ -10393,17 +10391,16 @@ distcheck: dist
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
- mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+ mkdir $(distdir)/_build $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e
's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build/sub \
- && ../../configure \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
- --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -10731,8 +10728,6 @@ uninstall-man: uninstall-man1 uninstall-man8
uninstall-systemdsystemunitDATA uninstall-taskSCRIPTS \
uninstall-updateDATA uninstall-updateSCRIPTS
-.PRECIOUS: Makefile
-
clean-local:
-rm -rf dist
diff --git a/aclocal.m4 b/aclocal.m4
index 5a62115..5b32a97 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -220,22 +220,7 @@ 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-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -247,10 +232,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])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.15'
+[am__api_version='1.13'
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.15], [],
+m4_if([$1], [1.13.4], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -266,14 +251,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.13.4])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Figure out how to run the assembler. -*- Autoconf -*-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -293,7 +278,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -338,14 +323,15 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_COND_IF -*- Autoconf -*-
-# Copyright (C) 2008-2014 Free Software Foundation, Inc.
+# Copyright (C) 2008-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -382,7 +368,7 @@ fi[]dnl
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -413,7 +399,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# 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,
@@ -604,7 +590,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# 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,
@@ -680,7 +666,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -689,12 +675,6 @@ 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])
# -----------------------------------------------
@@ -770,8 +750,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# <
http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <
http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target (and possibly the TAP driver). The
-# system "awk" is bad on some platforms.
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -803,51 +783,6 @@ 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(a)gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message. This
-can help us improve future automake versions.
-
-END
- if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
- echo 'Configuration will proceed anyway, since you have set the' >&2
- echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
- echo >&2
- else
- cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <
http://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
- AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
- fi
-fi
-dnl The trailing newline in this macro's definition is deliberate, for
-dnl backward compatibility and to allow trailing 'dnl'-style comments
-dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
@@ -856,6 +791,7 @@ 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.
@@ -877,7 +813,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg"
>`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -888,7 +824,7 @@ echo "timestamp for $_am_arg"
>`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh+set}" != xset; then
+if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -898,7 +834,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -920,7 +856,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -955,7 +891,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of
Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1003,9 +939,41 @@ 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-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1044,7 +1012,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1073,54 +1041,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_PROG_CC_C_O
-# ---------------
-# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
-# to automatically call this.
-AC_DEFUN([_AM_PROG_CC_C_O],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-AC_LANG_PUSH([C])dnl
-AC_CACHE_CHECK(
- [whether $CC understands -c and -o together],
- [am_cv_prog_cc_c_o],
- [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
- # Make sure it works both with $CC and with simple cc.
- # Following AC_PROG_CC_C_O, we do the test twice because some
- # compilers refuse to overwrite an existing .o file with -o,
- # though they will create one.
- am_cv_prog_cc_c_o=yes
- for am_i in 1 2; do
- if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
- && test -f conftest2.$ac_objext; then
- : OK
- else
- am_cv_prog_cc_c_o=no
- break
- fi
- done
- rm -f core conftest*
- unset am_i])
-if test "$am_cv_prog_cc_c_o" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-AC_LANG_POP([C])])
-
-# For backward compatibility.
-AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1139,7 +1060,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1220,7 +1141,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1280,7 +1201,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1308,7 +1229,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1327,7 +1248,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/config.h.in b/config.h.in
index 918c13e..041a18f 100644
--- a/config.h.in
+++ b/config.h.in
@@ -354,6 +354,9 @@
/* no getdomainname */
#undef NO_DOMAINNAME
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
/* OS version */
#undef OSVERSION
diff --git a/configure b/configure
index c996da5..2a88f1a 100755
--- a/configure
+++ b/configure
@@ -2804,7 +2804,7 @@ cat >>confdefs.h <<_ACEOF
#define DS_PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
-am__api_version='1.15'
+am__api_version='1.13'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -3005,8 +3005,8 @@ test "$program_suffix" != NONE &&
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed
"$ac_script"`
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
@@ -3025,7 +3025,7 @@ else
$as_echo "$as_me: WARNING: 'missing' script is too old or missing"
>&2;}
fi
-if test x"${install_sh+set}" != xset; then
+if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -3344,8 +3344,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# <
http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
-# We need awk for the "check" target (and possibly the TAP driver). The
-# system "awk" is bad on some platforms.
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
@@ -3446,48 +3446,6 @@ $as_echo "$am_cv_prog_tar_pax" >&6; }
-# 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(a)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
-
# define these for automake distdir
VERSION=$PACKAGE_VERSION
PACKAGE=$PACKAGE_TARNAME
@@ -4837,65 +4795,6 @@ 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
@@ -5024,6 +4923,131 @@ else
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
+
# By default we simply use the C compiler to build assembly code.
diff --git a/dirsrvtests/create_test.py b/dirsrvtests/create_test.py
index e3b89aa..7b06fdb 100755
--- a/dirsrvtests/create_test.py
+++ b/dirsrvtests/create_test.py
@@ -174,7 +174,9 @@ if len(sys.argv) > 0:
#
TEST.write('logging.getLogger(__name__).setLevel(logging.DEBUG)\n')
TEST.write('log = logging.getLogger(__name__)\n\n')
- TEST.write('installation1_prefix = None\n\n\n')
+
+ # We don't need the prefix anymore, it's worked out in lib389
+ # TEST.write('installation1_prefix = None\n\n\n')
#
# Write the replication or standalone classes
@@ -240,10 +242,10 @@ if len(sys.argv) > 0:
#
TEST.write('(a)pytest.fixture(scope="module")\n')
TEST.write('def topology(request):\n')
- TEST.write(' global installation1_prefix\n')
- TEST.write(' if installation1_prefix:\n')
- TEST.write(' args_instance[SER_DEPLOYED_DIR] = ' +
- 'installation1_prefix\n\n')
+ #TEST.write(' global installation1_prefix\n')
+ #TEST.write(' if installation1_prefix:\n')
+ #TEST.write(' args_instance[SER_DEPLOYED_DIR] = ' +
+ # 'installation1_prefix\n\n')
if repl_deployment:
#
diff --git a/dirsrvtests/tickets/ticket48363_test.py
b/dirsrvtests/tickets/ticket48363_test.py
new file mode 100644
index 0000000..33245a1
--- /dev/null
+++ b/dirsrvtests/tickets/ticket48363_test.py
@@ -0,0 +1,206 @@
+import os
+import sys
+import time
+import ldap
+import logging
+import pytest
+from lib389 import DirSrv, Entry, tools, tasks
+from lib389.tools import DirSrvTools
+from lib389._constants import *
+from lib389.properties import *
+from lib389.tasks import *
+from lib389.utils import *
+
+logging.getLogger(__name__).setLevel(logging.DEBUG)
+log = logging.getLogger(__name__)
+
+TEST_USER = 'uid=test,%s' % DEFAULT_SUFFIX
+# Well, it's better than "password" or "password1"
+TEST_PASS = 'banana cream pie'
+
+class TopologyStandalone(object):
+ def __init__(self, standalone):
+ standalone.open()
+ self.standalone = standalone
+
+
+(a)pytest.fixture(scope="module")
+def topology(request):
+
+ # Creating standalone instance ...
+ standalone = DirSrv(verbose=False)
+ args_instance[SER_HOST] = HOST_STANDALONE
+ args_instance[SER_PORT] = PORT_STANDALONE
+ args_instance[SER_SERVERID_PROP] = SERVERID_STANDALONE
+ args_instance[SER_CREATION_SUFFIX] = DEFAULT_SUFFIX
+ args_standalone = args_instance.copy()
+ standalone.allocate(args_standalone)
+ instance_standalone = standalone.exists()
+ if instance_standalone:
+ standalone.delete()
+ standalone.create()
+ standalone.open()
+
+ # Delete each instance in the end
+ def fin():
+ standalone.delete()
+ request.addfinalizer(fin)
+
+ # Clear out the tmp dir
+ standalone.clearTmpDir(__file__)
+
+ return TopologyStandalone(standalone)
+
+
+def test_ticket48363(topology):
+ """
+ Test the implementation of rfc3673, '+' for all operational attributes.
+
+ Please see:
https://tools.ietf.org/html/rfc3673
+
+ """
+
+ # Test the implementation of the supportFeatures
+
+ # Section 2:
+ # Servers supporting this feature SHOULD publish the Object Identifier
+ # 1.3.6.1.4.1.4203.1.5.1 as a value of the 'supportedFeatures'
+ # [RFC3674] attribute in the root DSE.
+
+ results = topology.standalone.search_s('', ldap.SCOPE_BASE,
'objectClass=*', ['supportedFeatures'] )[0]
+ if results.hasAttr('supportedfeatures') is False:
+ assert False
+ if results.hasValue('supportedfeatures', '1.3.6.1.4.1.4203.1.5.1') is
False:
+ assert False
+
+ # Section 2:
+ # The presence of the attribute description "+" (ASCII 43) in the list
+ # of attributes in a Search Request [RFC2251] SHALL signify a request
+ # for the return of all operational attributes.
+
+ # Test the two backends, rootdse, and a real ldbm backend
+
+ # Root DSE
+ results = topology.standalone.search_s('', ldap.SCOPE_BASE,
'objectClass=*', ['+'] )[0]
+ # There are a number of obvious ones in rootdse. These are:
+
+ rootdse_op_attrs = [
+ 'supportedExtension',
+ 'supportedControl',
+ 'supportedFeatures',
+ 'supportedSASLMechanisms',
+ 'supportedLDAPVersion',
+ 'vendorName',
+ 'vendorVersion',
+ ]
+
+ for opattr in rootdse_op_attrs:
+ if results.hasAttr(opattr) is False:
+ assert False
+
+ # LDBM backend
+ # We are going to examine the root of the suffix, as it's a good easy target
+ dc_op_attrs = [
+ 'nsuniqueid',
+ 'entrydn',
+ 'entryid',
+ 'aci',
+ ]
+ dc_user_attrs = [
+ 'objectClass',
+ 'dc',
+ ]
+
+ # We should show that the following work:
+
+ # '+'
+ results = topology.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_BASE,
'objectClass=*', ['+'] )[0]
+ for opattr in dc_op_attrs:
+ if results.hasAttr(opattr) is False:
+ assert False
+ for userattr in dc_user_attrs:
+ if results.hasAttr(userattr) is False:
+ assert True
+
+ # '+' '*'
+ results = topology.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_BASE,
'objectClass=*', ['+', '*'] )[0]
+ for opattr in dc_op_attrs:
+ if results.hasAttr(opattr) is False:
+ assert False
+ for userattr in dc_user_attrs:
+ if results.hasAttr(userattr) is False:
+ assert False
+
+ # Section 2:
+ # Client implementors should also note
+ # that certain operational attributes may be returned only if requested
+ # by name even when "+" is present.
+
+ # We do not currently have any types that are excluded.
+ # However, we should ensure that a search for "+ namedType" returns
+ # both all operational and the namedType
+
+ # '+' dc
+ results = topology.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_BASE,
'objectClass=*', ['+', 'dc'] )[0]
+ for opattr in dc_op_attrs:
+ if results.hasAttr(opattr) is False:
+ assert False
+ if results.hasAttr('dc') is False:
+ assert False
+ if results.hasAttr('objectclass') is False:
+ assert True
+
+ # '*' nsUniqueId
+ results = topology.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_BASE,
'objectClass=*', ['*', 'nsuniqueid'] )[0]
+ for userattr in dc_user_attrs:
+ if results.hasAttr(userattr) is False:
+ assert False
+ if results.hasAttr('nsuniqueid') is False:
+ assert False
+ if results.hasAttr('entrydn') is False:
+ assert True
+
+ # Section 2:
+ # As with all search requests, client implementors should note that
+ # results may not include all requested attributes due to access
+ # controls or other restrictions.
+
+ # Test that with a user with limit read aci, that these are enforced on
+ # the + request.
+
+ # Create the user
+ uentry = Entry(TEST_USER)
+ uentry.setValues('objectclass', 'top', 'extensibleobject')
+ uentry.setValues('uid', 'test')
+ uentry.setValues('userPassword', TEST_PASS)
+ topology.standalone.add_s(uentry)
+
+ # Give them a limited read aci: We may need to purge other acis
+ anonaci = '(targetattr!="userPassword")(version 3.0; acl "Enable
anonymous access"; allow (read, search, compare)
userdn="ldap:///anyone";)'
+ topology.standalone.modify_s(DEFAULT_SUFFIX, [(ldap.MOD_DELETE, 'aci',
anonaci)])
+
+ # Now we need to create an aci that allows anon/all read to only a few attrs
+ # Lets make one real, and one operational.
+
+ anonaci = '(targetattr="objectclass || dc || nsuniqueid")(version 3.0;
acl "Enable anonymous access"; allow (read, search, compare)
userdn="ldap:///anyone";)'
+ topology.standalone.modify_s(DEFAULT_SUFFIX, [(ldap.MOD_ADD, 'aci',
anonaci)])
+
+ # bind as them, and test.
+ topology.standalone.simple_bind_s(TEST_USER, TEST_PASS)
+ results = topology.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_BASE,
'objectClass=*', ['*', '+'] )[0]
+
+ if results.hasAttr('dc') is False:
+ assert False
+ if results.hasAttr('nsuniqueid') is False:
+ assert False
+ if results.hasAttr('entrydn') is False:
+ assert True
+
+ log.info('Test complete')
+
+
+if __name__ == '__main__':
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/ldap/servers/slapd/features.c b/ldap/servers/slapd/features.c
new file mode 100644
index 0000000..64a2825
--- /dev/null
+++ b/ldap/servers/slapd/features.c
@@ -0,0 +1,54 @@
+/** BEGIN COPYRIGHT BLOCK
+ * Copyright (C) 2016 Red Hat, Inc.
+ * All rights reserved.
+ *
+ * License: GPL (version 3 or any later version).
+ * See LICENSE for details.
+ * END COPYRIGHT BLOCK **/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* features.c - routines for dealing with supportedFeatures rfc3674 */
+
+#include <stdio.h>
+#include "slap.h"
+#include "slapi-plugin.h"
+
+int slapi_register_supported_feature( char *featureoid );
+static char **supported_features = NULL;
+static Slapi_RWLock *supported_features_lock = NULL;
+
+void
+init_features( void )
+{
+ supported_features_lock = slapi_new_rwlock();
+ if (supported_features_lock == NULL) {
+ slapi_log_error(SLAPI_LOG_FATAL, "startup",
+ "init_features: failed to create lock.\n");
+ exit(1);
+ }
+ slapi_register_supported_feature( LDAP_FEATURE_ALL_OP_ATTRS );
+}
+
+int
+slapi_register_supported_feature( char *featureoid )
+{
+ slapi_rwlock_wrlock(supported_features_lock);
+ charray_add( &supported_features, slapi_ch_strdup( featureoid ));
+ slapi_rwlock_unlock(supported_features_lock);
+ return LDAP_SUCCESS;
+}
+
+int
+slapi_get_supported_features_copy( char ***ftroidsp )
+{
+ slapi_rwlock_unlock(supported_features_lock);
+ if ( ftroidsp != NULL ) {
+ *ftroidsp = charray_dup(supported_features);
+ }
+ slapi_rwlock_unlock(supported_features_lock);
+ return LDAP_SUCCESS;
+}
+
diff --git a/ldap/servers/slapd/main.c b/ldap/servers/slapd/main.c
index b048dc5..1181628 100644
--- a/ldap/servers/slapd/main.c
+++ b/ldap/servers/slapd/main.c
@@ -702,6 +702,11 @@ main( int argc, char **argv)
init_controls();
/*
+ * Register the server features that we support.
+ */
+ init_features();
+
+ /*
* Initialize the global plugin list lock
*/
global_plugin_init();
diff --git a/ldap/servers/slapd/proto-slap.h b/ldap/servers/slapd/proto-slap.h
index 7a2ddde..8a0bdd3 100644
--- a/ldap/servers/slapd/proto-slap.h
+++ b/ldap/servers/slapd/proto-slap.h
@@ -650,6 +650,11 @@ void *sym_load( char *libpath, char *symbol, char *plugin, int
report_errors );
*/
void *sym_load_with_flags( char *libpath, char *symbol, char *plugin, int report_errors,
PRBool load_now, PRBool load_global );
+/*
+ * features.c
+ */
+
+void init_features( void );
/*
* filter.c
diff --git a/ldap/servers/slapd/result.c b/ldap/servers/slapd/result.c
index 5acff94..b5681ec 100644
--- a/ldap/servers/slapd/result.c
+++ b/ldap/servers/slapd/result.c
@@ -1119,7 +1119,7 @@ static const char *idds_map_attrt_v3(
/* Helper functions */
-static int send_all_attrs(Slapi_Entry *e,char **attrs,Slapi_Operation *op,Slapi_PBlock
*pb,BerElement *ber,int attrsonly,int ldapversion, int real_attrs_only, int
some_named_attrs)
+static int send_all_attrs(Slapi_Entry *e,char **attrs,Slapi_Operation *op,Slapi_PBlock
*pb,BerElement *ber,int attrsonly,int ldapversion, int real_attrs_only, int
some_named_attrs, int alloperationalattrs, int alluserattrs )
{
int i = 0;
int rc = 0;
@@ -1142,7 +1142,7 @@ static int send_all_attrs(Slapi_Entry *e,char
**attrs,Slapi_Operation *op,Slapi_
vattr_flags |= SLAPI_VIRTUALATTRS_ONLY;
}
- if (some_named_attrs) {
+ if (some_named_attrs || alloperationalattrs) {
/*
* If the client listed some attribute types by name, one or
* more of the requested types MAY be operational. Inform the
@@ -1189,11 +1189,11 @@ static int send_all_attrs(Slapi_Entry *e,char
**attrs,Slapi_Operation *op,Slapi_
name_to_return = current_type_name;
/* We only return operational attributes if the client is LDAPv2 and the attribute is
one of a special set,
- OR if the client also requested the attribute by name. If it did, we use the
specified name rather than
- the base name.
+ OR if all operational attrs are requested, OR if the client also requested the
attribute by name.
+ If it did, we use the specified name rather than the base name.
*/
if ( current_type_flags & SLAPI_ATTR_FLAG_OPATTR ) {
- if ( LDAP_VERSION2 == ldapversion && LASTMODATTR( current_type_name) ) {
+ if ( (LDAP_VERSION2 == ldapversion && LASTMODATTR( current_type_name)) ||
alloperationalattrs ) {
sendit = 1;
} else {
for ( i = 0; attrs != NULL && attrs[i] != NULL; i++ ) {
@@ -1215,7 +1215,7 @@ static int send_all_attrs(Slapi_Entry *e,char
**attrs,Slapi_Operation *op,Slapi_
/*
* it's a user attribute. send it.
*/
- } else {
+ } else if ( alluserattrs ) {
sendit = 1;
}
/* Now send to the client */
@@ -1474,7 +1474,10 @@ send_ldap_search_entry_ext(
Operation *op = pb->pb_op;
BerElement *ber = NULL;
int i, rc = 0, logit = 0;
- int alluserattrs, noattrs, some_named_attrs;
+ int alluserattrs;
+ int noattrs;
+ int some_named_attrs;
+ int alloperationalattrs;
Slapi_Operation *operation;
int real_attrs_only = 0;
LDAPControl **ctrlp = 0;
@@ -1557,15 +1560,17 @@ send_ldap_search_entry_ext(
/*
* in ldapv3, the special attribute "*" means all user attributes,
- * NULL means all user attributes, and "1.1" means no attributes.
+ * NULL means all user attributes, "1.1" means no attributes, and
+ * "+" means all operational attributes (rfc3673)
* operational attributes are only retrieved if they are named
- * specifically.
+ * specifically or when "+" is specified.
*/
/* figure out if we want all user attributes or no attributes at all */
alluserattrs = 0;
noattrs = 0;
some_named_attrs = 0;
+ alloperationalattrs = 0;
if ( attrs == NULL ) {
alluserattrs = 1;
} else {
@@ -1574,6 +1579,8 @@ send_ldap_search_entry_ext(
alluserattrs = 1;
} else if ( strcmp( LDAP_NO_ATTRS, attrs[i] ) == 0 ) {
noattrs = 1;
+ } else if ( strcmp( LDAP_ALL_OPERATIONAL_ATTRS, attrs[i] ) == 0 ) {
+ alloperationalattrs = 1;
} else {
some_named_attrs = 1;
}
@@ -1611,9 +1618,9 @@ send_ldap_search_entry_ext(
}
/* look through each attribute in the entry */
- if ( alluserattrs ) {
+ if ( alluserattrs || alloperationalattrs ) {
rc = send_all_attrs(e, attrs, op, pb, ber, attrsonly, conn->c_ldapversion,
- real_attrs_only, some_named_attrs);
+ real_attrs_only, some_named_attrs, alloperationalattrs,
alluserattrs);
}
/* if the client explicitly specified a list of attributes look through each attribute
requested */
@@ -2213,7 +2220,7 @@ encode_read_entry (Slapi_PBlock *pb, Slapi_Entry *e, char **attrs,
int alluserat
/* Send all the attributes */
if ( alluserattrs ) {
rc = send_all_attrs(e, attrs, op, pb, ber, 0, conn->c_ldapversion,
- real_attrs_only, attr_count);
+ real_attrs_only, attr_count, 0, 1);
if(rc){
goto cleanup;
}
diff --git a/ldap/servers/slapd/rootdse.c b/ldap/servers/slapd/rootdse.c
index 9b30423..d839c92 100644
--- a/ldap/servers/slapd/rootdse.c
+++ b/ldap/servers/slapd/rootdse.c
@@ -25,6 +25,7 @@ static char *readonly_attributes[] = {
"supportedldapversion",
"supportedcontrol",
"supportedextension",
+ "supportedfeatures",
"supportedsaslmechanisms",
"dataversion",
"ref",
@@ -190,6 +191,18 @@ read_root_dse( Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry
*entryAfter, int *r
charray_free(strs);
}
+ /* supported features */
+ attrlist_delete( &e->e_attrs, "supportedFeatures");
+ if ( slapi_get_supported_features_copy( &strs ) == 0
+ && strs != NULL ) {
+ for ( i = 0; strs[i] != NULL; ++i ) {
+ val.bv_val = strs[i];
+ val.bv_len = strlen( strs[i] );
+ attrlist_merge( &e->e_attrs, "supportedFeatures", vals );
+ }
+ charray_free(strs);
+ }
+
/* supported sasl mechanisms */
attrlist_delete( &e->e_attrs, "supportedSASLMechanisms");
if (( strs = ids_sasl_listmech (pb)) != NULL ) {
diff --git a/ldap/servers/slapd/slapi-plugin.h b/ldap/servers/slapd/slapi-plugin.h
index d2b076b..bf4e8c2 100644
--- a/ldap/servers/slapd/slapi-plugin.h
+++ b/ldap/servers/slapd/slapi-plugin.h
@@ -5585,11 +5585,11 @@ LDAPControl * slapi_dup_control( LDAPControl *ctrl );
#define SLAPI_OPERATION_ANY 0xFFFFFFFFUL
#define SLAPI_OPERATION_NONE 0x00000000UL
int slapi_get_supported_controls_copy( char ***ctrloidsp,
- unsigned long **ctrlopsp );
+ unsigned long **ctrlopsp );
int slapi_build_control( char *oid, BerElement *ber,
- char iscritical, LDAPControl **ctrlp );
+ char iscritical, LDAPControl **ctrlp );
int slapi_build_control_from_berval( char *oid, struct berval *bvp,
- char iscritical, LDAPControl **ctrlp );
+ char iscritical, LDAPControl **ctrlp );
/* Given an array of controls e.g. LDAPControl **ctrls, add the given
control to the end of the array, growing the array with realloc
@@ -5615,6 +5615,15 @@ void slapi_add_controls( LDAPControl ***ctrlsp, LDAPControl
**newctrls, int copy
*/
char **slapi_get_supported_extended_ops_copy( void );
+/*
+ * routines for dealing with supported features
+ */
+
+#ifndef LDAP_FEATURE_ALL_OP_ATTRS
+#define LDAP_FEATURE_ALL_OP_ATTRS "1.3.6.1.4.1.4203.1.5.1"
+#endif
+
+int slapi_get_supported_features_copy( char ***ftroidsp );
/*
* bind, including SASL
@@ -7450,6 +7459,12 @@ char **slapi_str2charray_ext( char *str, char *brkstr, int
allow_dups );
#endif
#endif
+/*
+ * As per rfc3673
+ */
+
+#define LDAP_ALL_OPERATIONAL_ATTRS "+"
+
#ifndef LDAP_SASL_EXTERNAL
#define LDAP_SASL_EXTERNAL "EXTERNAL" /* TLS/SSL extension */
#endif