Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • openldap/openldap
  • hyc/openldap
  • ryan/openldap
  • iboukris/openldap
  • ondra/openldap
  • sshanks-kx/openldap
  • blaggacao/openldap
  • pbrezina/openldap
  • quanah/openldap
  • dragos_h/openldap
  • lorenz/openldap
  • tsaarni/openldap
  • fei.ding/openldap
  • orent/openldap
  • arrowplum/openldap
  • barchiesi/openldap
  • jotik/openldap
  • hamano/openldap
  • ingovoss/openldap
  • henson/openldap
  • jlrine2/openldap
  • howeverAT/openldap
  • nivanova/openldap
  • orbea/openldap
  • rdubner/openldap
  • smckinney/openldap
  • jklowden/openldap
  • dpa-openldap/openldap
  • rouzier/openldap
  • orgads/openldap
  • ffontaine/openldap
  • jiaqingz/openldap
  • dcoutadeur/openldap
  • begeragus/openldap
  • pubellit/openldap
  • glandium/openldap
  • facboy/openldap
  • thesamesam/openldap
  • Johan/openldap
  • fkooman/openldap
  • gburd/openldap
  • h-homma/openldap
  • sgallagher/openldap
  • ahmed_zaki/openldap
  • gnoe/openldap
  • mid/openldap
  • clan/openldap
47 results
Show changes
Showing
with 246 additions and 223 deletions
......@@ -78,6 +78,13 @@ class LDAPEntry{
* @param attr The attribute to add to the list.
*/
void addAttribute(const LDAPAttribute& attr);
/**
* Deletes all values of an Attribute from the list of Attributes
* (simple wrapper around LDAPAttributeList::delAttribute() ).
* @param type The attribute to delete.
*/
void delAttribute(const std::string& type);
/**
* Replace an Attribute in the List of Attributes (simple wrapper
......
// $OpenLDAP$
/*
* Copyright 2000-2007, OpenLDAP Foundation, All Rights Reserved.
* Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
......
......@@ -33,7 +33,7 @@ LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){
sup = oc.sup;
}
LDAPObjClass::LDAPObjClass (string oc_item) {
LDAPObjClass::LDAPObjClass (string oc_item, int flags ) {
DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPObjClass::LDAPObjClass( )" << endl);
......@@ -41,7 +41,7 @@ LDAPObjClass::LDAPObjClass (string oc_item) {
LDAPObjectClass *o;
int ret;
const char *errp;
o = ldap_str2objectclass ( oc_item.c_str(), &ret, &errp, SCHEMA_PARSE_FLAG);
o = ldap_str2objectclass ( oc_item.c_str(), &ret, &errp, flags );
if (o) {
this->setNames (o->oc_names);
......@@ -91,31 +91,31 @@ void LDAPObjClass::setOid (char *oc_oid) {
oid = oc_oid;
}
string LDAPObjClass::getOid () {
string LDAPObjClass::getOid() const {
return oid;
}
string LDAPObjClass::getDesc () {
string LDAPObjClass::getDesc() const {
return desc;
}
StringList LDAPObjClass::getNames () {
StringList LDAPObjClass::getNames() const {
return names;
}
StringList LDAPObjClass::getMust () {
StringList LDAPObjClass::getMust() const {
return must;
}
StringList LDAPObjClass::getMay () {
StringList LDAPObjClass::getMay() const {
return may;
}
StringList LDAPObjClass::getSup () {
StringList LDAPObjClass::getSup() const {
return sup;
}
string LDAPObjClass::getName () {
string LDAPObjClass::getName() const {
if (names.empty())
return "";
......@@ -123,7 +123,7 @@ string LDAPObjClass::getName () {
return *(names.begin());
}
int LDAPObjClass::getKind () {
int LDAPObjClass::getKind() const {
return kind;
}
......
......@@ -12,9 +12,6 @@
#include "StringList.h"
#define SCHEMA_PARSE_FLAG 0x03
using namespace std;
/**
......@@ -36,7 +33,7 @@ class LDAPObjClass{
/**
* Copy constructor
*/
LDAPObjClass (const LDAPObjClass& oc);
LDAPObjClass( const LDAPObjClass& oc );
/**
* Constructs new object and fills the data structure by parsing the
......@@ -46,7 +43,8 @@ class LDAPObjClass{
* "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
* DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))"
*/
LDAPObjClass (string oc_item);
LDAPObjClass (string oc_item, int flags = LDAP_SCHEMA_ALLOW_NO_OID |
LDAP_SCHEMA_ALLOW_QUOTED);
/**
* Destructor
......@@ -56,42 +54,42 @@ class LDAPObjClass{
/**
* Returns object class description
*/
string getDesc ();
string getDesc() const;
/**
* Returns object class oid
*/
string getOid ();
string getOid() const;
/**
* Returns object class name (first one if there are more of them)
*/
string getName ();
string getName() const;
/**
* Returns object class kind: 0=ABSTRACT, 1=STRUCTURAL, 2=AUXILIARY
*/
int getKind ();
int getKind() const;
/**
* Returns all object class names
*/
StringList getNames();
StringList getNames() const;
/**
* Returns list of required attributes
*/
StringList getMust();
StringList getMust() const;
/**
* Returns list of allowed (and not required) attributes
*/
StringList getMay();
StringList getMay() const;
/**
* Returns list of the OIDs of the superior ObjectClasses
*/
StringList getSup();
StringList getSup() const;
void setNames (char **oc_names);
void setMay (char **oc_may);
......
......@@ -196,14 +196,14 @@ LDAPEntry LdifReader::getEntryRecord()
}
else
{
if ( curAl->getAttributeByName( i->first ) )
const LDAPAttribute* existing = curAl->getAttributeByName( i->first );
if ( existing )
{
// Attribute exists already -> Syntax Error
std::ostringstream err;
err << "Line " << this->m_lineNumber
<< ": Attribute \"" << i->first
<< "\" specified multiple times.";
throw( std::runtime_error(err.str()) );
// Attribute exists already (handle gracefully)
curAl->addAttribute( curAttr );
curAttr = LDAPAttribute( *existing );
curAttr.addValue(i->second);
curAl->delAttribute( i->first );
}
else
{
......
// $OpenLDAP$
/*
* Copyright 2008, OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
......
# $OpenLDAP$
###
# Copyright 2000, OpenLDAP Foundation, All Rights Reserved.
# Copyright 2000-2008, OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
......@@ -84,16 +84,18 @@ include_HEADERS = LDAPAsynConnection.h \
SaslInteractionHandler.h \
StringList.h
noinst_HEADERS = LDAPAddRequest.h \
LDAPBindRequest.h \
LDAPCompareRequest.h \
LDAPDeleteRequest.h \
LDAPExtRequest.h \
LDAPModDNRequest.h \
LDAPModifyRequest.h \
LDAPRequest.h \
LDAPSearchRequest.h
noinst_HEADERS = ac/time.h \
debug.h \
LDAPAddRequest.h \
LDAPBindRequest.h \
LDAPCompareRequest.h \
LDAPDeleteRequest.h \
LDAPExtRequest.h \
LDAPModDNRequest.h \
LDAPModifyRequest.h \
LDAPRequest.h \
LDAPSearchRequest.h
libldapcpp_la_LIBADD = -lldap -llber
libldapcpp_la_LDFLAGS = -version-info 0:5:0
libldapcpp_la_LDFLAGS = -version-info @OPENLDAP_CPP_API_VERSION@
This diff is collapsed.
/* Generic time.h */
/* $OpenLDAP$ */
/*
* Copyright 1998-2008 The OpenLDAP Foundation, Redwood City, California, USA
* Copyright 1998-2009 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted only
......
#! /bin/sh
# $OpenLDAP$
#
# Copyright 2008, OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
DIR=`dirname $0`
. $DIR/version.var
echo OL_CPP_API_VERSION=$ol_cpp_api_current:$ol_cpp_api_revision:$ol_cpp_api_age
echo OL_CPP_API_RELEASE=$ol_cpp_api_rel_major.$ol_cpp_api_rel_minor.$ol_cpp_api_rel_patch
#! /bin/sh
# $OpenLDAP$
#
# Copyright 2008, OpenLDAP Foundation, All Rights Reserved.
# COPYING RESTRICTIONS APPLY, see COPYRIGHT file
ol_cpp_api_rel_major=0
ol_cpp_api_rel_minor=0
ol_cpp_api_rel_patch=0
ol_cpp_api_current=0
ol_cpp_api_revision=0
ol_cpp_api_age=0
This diff is collapsed.
Copyright 2005-2008 The OpenLDAP Foundation. All rights reserved.
Copyright 2005-2009 The OpenLDAP Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted only as authorized by the OpenLDAP
......
/* $OpenLDAP$ */
/*
* Copyright 1998-2008 The OpenLDAP Foundation.
* Copyright 1998-2009 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......
Copyright 2004-2008 The OpenLDAP Foundation. All rights reserved.
Copyright 2004-2009 The OpenLDAP Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted only as authorized by the OpenLDAP
......
This diff is collapsed.
This diff is collapsed.