Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
François Kooman
OpenLDAP
Commits
1f7c26e4
Commit
1f7c26e4
authored
24 years ago
by
Kurt Zeilenga
Browse files
Options
Downloads
Patches
Plain Diff
First cut new schema support.
Back-shell still doesn't support binary data, should use -lldif routines
parent
fad62c5d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
servers/slapd/back-shell/compare.c
+9
-2
9 additions, 2 deletions
servers/slapd/back-shell/compare.c
servers/slapd/back-shell/external.h
+1
-1
1 addition, 1 deletion
servers/slapd/back-shell/external.h
servers/slapd/back-shell/modify.c
+16
-10
16 additions, 10 deletions
servers/slapd/back-shell/modify.c
with
26 additions
and
13 deletions
servers/slapd/back-shell/compare.c
+
9
−
2
View file @
1f7c26e4
...
...
@@ -22,7 +22,7 @@ shell_back_compare(
Operation
*
op
,
const
char
*
dn
,
const
char
*
ndn
,
A
va
*
ava
A
ttributeAssertion
*
ava
)
{
struct
shellinfo
*
si
=
(
struct
shellinfo
*
)
be
->
be_private
;
...
...
@@ -41,12 +41,19 @@ shell_back_compare(
return
(
-
1
);
}
/*
* FIX ME: This should use LDIF routines so that binary
* values are properly dealt with
*/
/* write out the request to the compare process */
fprintf
(
wfp
,
"COMPARE
\n
"
);
fprintf
(
wfp
,
"msgid: %ld
\n
"
,
(
long
)
op
->
o_msgid
);
print_suffixes
(
wfp
,
be
);
fprintf
(
wfp
,
"dn: %s
\n
"
,
dn
);
fprintf
(
wfp
,
"%s: %s
\n
"
,
ava
->
ava_type
,
ava
->
ava_value
.
bv_val
);
fprintf
(
wfp
,
"%s: %s
\n
"
,
ava
->
aa_desc
->
ad_cname
->
bv_val
,
ava
->
aa_value
->
bv_val
/* could be binary! */
);
fclose
(
wfp
);
/* read in the result and send it along */
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/back-shell/external.h
+
1
−
1
View file @
1f7c26e4
...
...
@@ -37,7 +37,7 @@ extern int shell_back_search LDAP_P(( BackendDB *bd,
extern
int
shell_back_compare
LDAP_P
((
BackendDB
*
bd
,
Connection
*
conn
,
Operation
*
op
,
const
char
*
dn
,
const
char
*
ndn
,
A
va
*
ava
));
A
ttributeAssertion
*
ava
));
extern
int
shell_back_modify
LDAP_P
((
BackendDB
*
bd
,
Connection
*
conn
,
Operation
*
op
,
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/back-shell/modify.c
+
16
−
10
View file @
1f7c26e4
...
...
@@ -22,9 +22,10 @@ shell_back_modify(
Operation
*
op
,
const
char
*
dn
,
const
char
*
ndn
,
LDAPModList
*
ml
Modifications
*
ml
)
{
Modification
*
mod
;
struct
shellinfo
*
si
=
(
struct
shellinfo
*
)
be
->
be_private
;
FILE
*
rfp
,
*
wfp
;
int
i
;
...
...
@@ -47,25 +48,30 @@ shell_back_modify(
fprintf
(
wfp
,
"msgid: %ld
\n
"
,
(
long
)
op
->
o_msgid
);
print_suffixes
(
wfp
,
be
);
fprintf
(
wfp
,
"dn: %s
\n
"
,
dn
);
for
(
;
ml
!=
NULL
;
ml
=
ml
->
ml_next
)
{
switch
(
ml
->
ml_op
)
{
for
(
;
ml
!=
NULL
;
ml
=
ml
->
sml_next
)
{
mod
=
&
ml
->
sml_mod
;
/* FIXME: should use LDIF routines to deal with binary data */
switch
(
mod
->
sm_op
)
{
case
LDAP_MOD_ADD
:
fprintf
(
wfp
,
"add: %s
\n
"
,
m
l
->
ml_type
);
fprintf
(
wfp
,
"add: %s
\n
"
,
m
od
->
sm_desc
->
ad_cname
->
bv_val
);
break
;
case
LDAP_MOD_DELETE
:
fprintf
(
wfp
,
"delete: %s
\n
"
,
m
l
->
ml_type
);
fprintf
(
wfp
,
"delete: %s
\n
"
,
m
od
->
sm_desc
->
ad_cname
->
bv_val
);
break
;
case
LDAP_MOD_REPLACE
:
fprintf
(
wfp
,
"replace: %s
\n
"
,
m
l
->
ml_type
);
fprintf
(
wfp
,
"replace: %s
\n
"
,
m
od
->
sm_desc
->
ad_cname
->
bv_val
);
break
;
}
for
(
i
=
0
;
ml
->
ml_bvalues
!=
NULL
&&
ml
->
ml_bvalues
[
i
]
!=
NULL
;
i
++
)
{
fprintf
(
wfp
,
"%s: %s
\n
"
,
ml
->
ml_type
,
ml
->
ml_bvalues
[
i
]
->
bv_val
);
if
(
mod
->
sm_bvalues
!=
NULL
)
{
for
(
i
=
0
;
mod
->
sm_bvalues
[
i
]
!=
NULL
;
i
++
)
{
fprintf
(
wfp
,
"%s: %s
\n
"
,
mod
->
sm_desc
->
ad_cname
->
bv_val
,
mod
->
sm_bvalues
[
i
]
->
bv_val
/* binary! */
);
}
}
}
fclose
(
wfp
);
...
...
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