Skip to content

Commit

Permalink
Add the oid into the config file and change compare into cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
cosminghitea authored and cosminghitea committed Jan 31, 2018
1 parent 6b53560 commit 74690cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sample/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"ldapControls": {
"ldapModificationControlPostRead": {
"oid": "postread",
"oid": "1.3.6.1.1.13.2",
"value": [
"entryCSN",
"entryUUID",
Expand All @@ -52,7 +52,7 @@
"isCritical": false
},
"ldapModificationControlPreRead": {
"oid": "preread",
"oid": "1.3.6.1.1.13.1",
"value": [
"cn",
"sn"
Expand Down
4 changes: 2 additions & 2 deletions src/ldap_control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ std::vector<LDAPControl *> LdapControls::CreateModificationControls(
v8::String::Utf8Value controlOperation(
controls->Get(Nan::New(constants::changeOidMember).ToLocalChecked()));

if (std::strcmp(*controlOperation, constants::postread) ==
if (std::strcmp(*controlOperation, LDAP_CONTROL_POST_READ) ==
constants::STR_COMPARE_TRUE) {
ctrl->ldctl_oid = LDAP_CONTROL_POST_READ;
} else if (std::strcmp(*controlOperation, constants::preread) ==
} else if (std::strcmp(*controlOperation, LDAP_CONTROL_PRE_READ) ==
constants::STR_COMPARE_TRUE) {
ctrl->ldctl_oid = LDAP_CONTROL_PRE_READ;
} else {
Expand Down
4 changes: 2 additions & 2 deletions test/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@
},
"ldapControls": {
"ldapModificationControlPostRead": {
"oid": "postread",
"oid": "1.3.6.1.1.13.2",
"value": [
"entryCSN",
"entryUUID"
],
"isCritical": false
},
"ldapModificationControlPreRead": {
"oid": "preread",
"oid": "1.3.6.1.1.13.1",
"value": [
"cn",
"sn"
Expand Down

0 comments on commit 74690cb

Please sign in to comment.