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
Christopher Ng
OpenLDAP
Commits
cc475f4b
Commit
cc475f4b
authored
19 years ago
by
Luke Howard
Browse files
Options
Downloads
Patches
Plain Diff
Allow arbitrary exop data to be base64 encoded
Argument matches LDIF, ie <oid|oid:data|oid::b64data>
parent
57233907
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clients/tools/ldapexop.c
+21
-6
21 additions, 6 deletions
clients/tools/ldapexop.c
with
21 additions
and
6 deletions
clients/tools/ldapexop.c
+
21
−
6
View file @
cc475f4b
...
...
@@ -42,7 +42,7 @@ void
usage
(
void
)
{
fprintf
(
stderr
,
_
(
"Issue LDAP extended operations
\n\n
"
));
fprintf
(
stderr
,
_
(
"usage: %s [options]
[oid[:
data
]]
\n
"
),
prog
);
fprintf
(
stderr
,
_
(
"usage: %s [options]
<oid|oid:data|oid::b64
data
>
\n
"
),
prog
);
tool_common_usage
();
exit
(
EXIT_FAILURE
);
}
...
...
@@ -190,17 +190,32 @@ main( int argc, char *argv[] )
}
p
=
strchr
(
argv
[
0
],
':'
);
if
(
p
==
argv
[
0
]
)
{
usage
();
}
if
(
p
!=
NULL
)
*
p
++
=
'\0'
;
if
(
tool_is_oid
(
argv
[
0
]
)
)
{
struct
berval
reqdata
;
if
(
p
)
{
reqdata
.
bv_val
=
p
;
reqdata
.
bv_len
=
strlen
(
reqdata
.
bv_val
);
struct
berval
reqdata
;
struct
berval
type
;
struct
berval
value
;
int
freeval
;
if
(
p
!=
NULL
)
{
p
[
-
1
]
=
':'
;
ldif_parse_line2
(
argv
[
0
],
&
type
,
&
value
,
&
freeval
);
p
[
-
1
]
=
'\0'
;
if
(
freeval
)
{
reqdata
=
value
;
}
else
{
ber_dupbv
(
&
reqdata
,
&
value
);
}
}
tool_server_controls
(
ld
,
NULL
,
0
);
rc
=
ldap_extended_operation
(
ld
,
argv
[
0
],
p
?
&
reqdata
:
NULL
,
NULL
,
NULL
,
&
id
);
...
...
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