mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
be more liberal when parsing LDIF Entries
This commit is contained in:
parent
e5dfb18abc
commit
af38418187
@ -196,14 +196,14 @@ LDAPEntry LdifReader::getEntryRecord()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( curAl->getAttributeByName( i->first ) )
|
const LDAPAttribute* existing = curAl->getAttributeByName( i->first );
|
||||||
|
if ( existing )
|
||||||
{
|
{
|
||||||
// Attribute exists already -> Syntax Error
|
// Attribute exists already (handle gracefully)
|
||||||
std::ostringstream err;
|
curAl->addAttribute( curAttr );
|
||||||
err << "Line " << this->m_lineNumber
|
curAttr = LDAPAttribute( *existing );
|
||||||
<< ": Attribute \"" << i->first
|
curAttr.addValue(i->second);
|
||||||
<< "\" specified multiple times.";
|
curAl->delAttribute( i->first );
|
||||||
throw( std::runtime_error(err.str()) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
@ -116,6 +116,7 @@ CXXFLAGS = @CXXFLAGS@
|
|||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
ECHO = @ECHO@
|
ECHO = @ECHO@
|
||||||
ECHO_C = @ECHO_C@
|
ECHO_C = @ECHO_C@
|
||||||
ECHO_N = @ECHO_N@
|
ECHO_N = @ECHO_N@
|
||||||
@ -138,6 +139,7 @@ LN_S = @LN_S@
|
|||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
OBJEXT = @OBJEXT@
|
OBJEXT = @OBJEXT@
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
@ -350,8 +352,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
|||||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||||
if test -f $$p; then \
|
if test -f $$p; then \
|
||||||
f=$(am__strip_dir) \
|
f=$(am__strip_dir) \
|
||||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||||
else :; fi; \
|
else :; fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -359,8 +361,8 @@ uninstall-libLTLIBRARIES:
|
|||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||||
p=$(am__strip_dir) \
|
p=$(am__strip_dir) \
|
||||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||||
done
|
done
|
||||||
|
|
||||||
clean-libLTLIBRARIES:
|
clean-libLTLIBRARIES:
|
||||||
@ -472,8 +474,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
|||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | \
|
done | \
|
||||||
$(AWK) ' { files[$$0] = 1; } \
|
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||||
END { for (i in files) print i; }'`; \
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
mkid -fID $$unique
|
mkid -fID $$unique
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
|
|
||||||
@ -485,8 +487,8 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
|||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | \
|
done | \
|
||||||
$(AWK) ' { files[$$0] = 1; } \
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
END { for (i in files) print i; }'`; \
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||||
test -n "$$unique" || unique=$$empty_fix; \
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
@ -496,13 +498,12 @@ ctags: CTAGS
|
|||||||
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||||
$(TAGS_FILES) $(LISP)
|
$(TAGS_FILES) $(LISP)
|
||||||
tags=; \
|
tags=; \
|
||||||
here=`pwd`; \
|
|
||||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | \
|
done | \
|
||||||
$(AWK) ' { files[$$0] = 1; } \
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
END { for (i in files) print i; }'`; \
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
$$tags $$unique
|
$$tags $$unique
|
||||||
|
Loading…
Reference in New Issue
Block a user