Skip to content
Snippets Groups Projects
Commit 6578cfd0 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

Allow to pass LDAP_SCHEMA_-flags

parent 3ea75bbf
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ LDAPAttrType::LDAPAttrType(){ ...@@ -19,7 +19,7 @@ LDAPAttrType::LDAPAttrType(){
usage = 0; usage = 0;
} }
LDAPAttrType::LDAPAttrType (string at_item) { LDAPAttrType::LDAPAttrType (string at_item, int flags ) {
DEBUG(LDAP_DEBUG_CONSTRUCT, DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPAttrType::LDAPAttrType( )" << endl); "LDAPAttrType::LDAPAttrType( )" << endl);
...@@ -27,7 +27,7 @@ LDAPAttrType::LDAPAttrType (string at_item) { ...@@ -27,7 +27,7 @@ LDAPAttrType::LDAPAttrType (string at_item) {
LDAPAttributeType *a; LDAPAttributeType *a;
int ret; int ret;
const char *errp; const char *errp;
a = ldap_str2attributetype (at_item.c_str(), &ret, &errp,SCHEMA_PARSE_FLAG); a = ldap_str2attributetype (at_item.c_str(), &ret, &errp, flags);
if (a) { if (a) {
this->setNames( a->at_names ); this->setNames( a->at_names );
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
#include "StringList.h" #include "StringList.h"
#define SCHEMA_PARSE_FLAG 0x03
using namespace std; using namespace std;
/** /**
...@@ -43,7 +40,8 @@ class LDAPAttrType{ ...@@ -43,7 +40,8 @@ class LDAPAttrType{
* "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC '' * "( SuSE.YaST.Attr:19 NAME ( 'skelDir' ) DESC ''
* EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )" * EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )"
*/ */
LDAPAttrType (string at_item); LDAPAttrType (string at_item, int flags = LDAP_SCHEMA_ALLOW_NO_OID |
LDAP_SCHEMA_ALLOW_QUOTED );
/** /**
* Destructor * Destructor
......
...@@ -33,7 +33,7 @@ LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){ ...@@ -33,7 +33,7 @@ LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){
sup = oc.sup; sup = oc.sup;
} }
LDAPObjClass::LDAPObjClass (string oc_item) { LDAPObjClass::LDAPObjClass (string oc_item, int flags ) {
DEBUG(LDAP_DEBUG_CONSTRUCT, DEBUG(LDAP_DEBUG_CONSTRUCT,
"LDAPObjClass::LDAPObjClass( )" << endl); "LDAPObjClass::LDAPObjClass( )" << endl);
...@@ -41,7 +41,7 @@ LDAPObjClass::LDAPObjClass (string oc_item) { ...@@ -41,7 +41,7 @@ LDAPObjClass::LDAPObjClass (string oc_item) {
LDAPObjectClass *o; LDAPObjectClass *o;
int ret; int ret;
const char *errp; 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) { if (o) {
this->setNames (o->oc_names); this->setNames (o->oc_names);
......
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
#include "StringList.h" #include "StringList.h"
#define SCHEMA_PARSE_FLAG 0x03
using namespace std; using namespace std;
/** /**
...@@ -36,7 +33,7 @@ class LDAPObjClass{ ...@@ -36,7 +33,7 @@ class LDAPObjClass{
/** /**
* Copy constructor * Copy constructor
*/ */
LDAPObjClass (const LDAPObjClass& oc); LDAPObjClass( const LDAPObjClass& oc );
/** /**
* Constructs new object and fills the data structure by parsing the * Constructs new object and fills the data structure by parsing the
...@@ -46,7 +43,8 @@ class LDAPObjClass{ ...@@ -46,7 +43,8 @@ class LDAPObjClass{
* "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL * "( SuSE.YaST.OC:5 NAME 'userTemplate' SUP objectTemplate STRUCTURAL
* DESC 'User object template' MUST ( cn ) MAY ( secondaryGroup ))" * 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 * Destructor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment