Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jaak Ristioja
OpenLDAP
Commits
32752fb3
Commit
32752fb3
authored
21 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
ITS#2836 add SLAPI_ADD_RESCONTROL support, fix SLAPI_RES_CONTROLS def
parent
ff2c3ddc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
servers/slapd/slapi/slapi.h
+2
-0
2 additions, 0 deletions
servers/slapd/slapi/slapi.h
servers/slapd/slapi/slapi_pblock.c
+19
-2
19 additions, 2 deletions
servers/slapd/slapi/slapi_pblock.c
with
21 additions
and
2 deletions
servers/slapd/slapi/slapi.h
+
2
−
0
View file @
32752fb3
...
...
@@ -446,6 +446,8 @@ extern Backend * slapi_cl_get_be(char *dn);
#define SLAPI_ENTRY_POST_OP 53
#define SLAPI_RESCONTROLS 55
/* This is the spelling in the SunOne 5.2 docs */
#define SLAPI_RES_CONTROLS SLAPI_RESCONTROLS
#define SLAPI_ADD_RESCONTROL 56
#define SLAPI_ADD_TARGET SLAPI_TARGET_DN
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/slapi/slapi_pblock.c
+
19
−
2
View file @
32752fb3
...
...
@@ -278,6 +278,7 @@ set( Slapi_PBlock *pb, int param, void *val )
{
#if defined(LDAP_SLAPI)
int
i
,
freeit
;
int
addcon
=
0
;
if
(
isValidParam
(
pb
,
param
)
==
INVALID_PARAM
)
{
return
PBLOCK_ERROR
;
...
...
@@ -290,6 +291,11 @@ set( Slapi_PBlock *pb, int param, void *val )
return
PBLOCK_ERROR
;
}
if
(
param
==
SLAPI_ADD_RESCONTROL
)
{
addcon
=
1
;
param
=
SLAPI_RES_CONTROLS
;
}
switch
(
param
)
{
case
SLAPI_CONN_DN
:
case
SLAPI_CONN_AUTHMETHOD
:
...
...
@@ -311,8 +317,19 @@ set( Slapi_PBlock *pb, int param, void *val )
pb
->
curParams
[
i
]
=
param
;
pb
->
numParams
++
;
}
if
(
freeit
)
ch_free
(
pb
->
curVals
[
i
]
);
pb
->
curVals
[
i
]
=
val
;
if
(
addcon
)
{
LDAPControl
**
ctrls
=
pb
->
curVals
[
i
];
int
j
;
for
(
j
=
0
;
ctrls
[
j
];
j
++
);
ctrls
=
ch_realloc
(
ctrls
,
(
j
+
2
)
*
sizeof
(
LDAPControl
*
)
);
ctrls
[
j
]
=
val
;
ctrls
[
j
+
1
]
=
NULL
;
pb
->
curVals
[
i
]
=
ctrls
;
}
else
{
if
(
freeit
)
ch_free
(
pb
->
curVals
[
i
]
);
pb
->
curVals
[
i
]
=
val
;
}
unLock
(
pb
);
return
LDAP_SUCCESS
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment