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
James Lowden
OpenLDAP
Commits
101090f8
Commit
101090f8
authored
14 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
More for ITS#6645
parent
2927b7a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
clients/tools/common.c
+22
-1
22 additions, 1 deletion
clients/tools/common.c
clients/tools/common.h
+1
-0
1 addition, 0 deletions
clients/tools/common.h
doc/devel/args
+1
-1
1 addition, 1 deletion
doc/devel/args
libraries/liblutil/ldif.c
+1
-1
1 addition, 1 deletion
libraries/liblutil/ldif.c
with
25 additions
and
3 deletions
clients/tools/common.c
+
22
−
1
View file @
101090f8
...
@@ -66,6 +66,7 @@ int nocanon = 0;
...
@@ -66,6 +66,7 @@ int nocanon = 0;
int
referrals
=
0
;
int
referrals
=
0
;
int
verbose
=
0
;
int
verbose
=
0
;
int
ldif
=
0
;
int
ldif
=
0
;
ber_len_t
ldif_wrap
=
LDIF_LINE_WIDTH
;
char
*
prog
=
NULL
;
char
*
prog
=
NULL
;
/* connection */
/* connection */
...
@@ -311,6 +312,7 @@ N_(" -N do not use reverse DNS to canonicalize SASL host name\n"),
...
@@ -311,6 +312,7 @@ N_(" -N do not use reverse DNS to canonicalize SASL host name\n"),
N_
(
" -O props SASL security properties
\n
"
),
N_
(
" -O props SASL security properties
\n
"
),
N_
(
" -o <opt>[=<optparam] general options
\n
"
),
N_
(
" -o <opt>[=<optparam] general options
\n
"
),
N_
(
" nettimeout=<timeout> (in seconds, or
\"
none
\"
or
\"
max
\"
)
\n
"
),
N_
(
" nettimeout=<timeout> (in seconds, or
\"
none
\"
or
\"
max
\"
)
\n
"
),
N_
(
" ldif-wrap=<width> (in columns, or
\"
no
\"
for no wrapping)
\n
"
),
N_
(
" -p port port on LDAP server
\n
"
),
N_
(
" -p port port on LDAP server
\n
"
),
N_
(
" -Q use SASL Quiet mode
\n
"
),
N_
(
" -Q use SASL Quiet mode
\n
"
),
N_
(
" -R realm SASL realm
\n
"
),
N_
(
" -R realm SASL realm
\n
"
),
...
@@ -751,11 +753,30 @@ tool_args( int argc, char **argv )
...
@@ -751,11 +753,30 @@ tool_args( int argc, char **argv )
prog
,
(
long
)
nettimeout
.
tv_sec
);
prog
,
(
long
)
nettimeout
.
tv_sec
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
}
else
if
(
strcasecmp
(
control
,
"ldif-wrap"
)
==
0
)
{
if
(
cvalue
==
0
)
{
ldif_wrap
=
LDIF_LINE_WIDTH
;
}
else
if
(
strcasecmp
(
cvalue
,
"no"
)
==
0
)
{
ldif_wrap
=
LDIF_LINE_WIDTH_MAX
;
}
else
{
unsigned
int
u
;
if
(
lutil_atou
(
&
u
,
cvalue
)
)
{
fprintf
(
stderr
,
_
(
"Unable to parse ldif-wrap=
\"
%s
\"\n
"
),
cvalue
);
exit
(
EXIT_FAILURE
);
}
ldif_wrap
=
(
ber_len_t
)
u
;
}
}
else
{
}
else
{
fprintf
(
stderr
,
"Invalid general option name: %s
\n
"
,
fprintf
(
stderr
,
"Invalid general option name: %s
\n
"
,
control
);
control
);
usage
();
usage
();
}
}
ber_memfree
(
control
);
break
;
break
;
case
'O'
:
case
'O'
:
#ifdef HAVE_CYRUS_SASL
#ifdef HAVE_CYRUS_SASL
...
@@ -2249,7 +2270,7 @@ tool_write_ldif( int type, char *name, char *value, ber_len_t vallen )
...
@@ -2249,7 +2270,7 @@ tool_write_ldif( int type, char *name, char *value, ber_len_t vallen )
{
{
char
*
ldif
;
char
*
ldif
;
if
((
ldif
=
ldif_put
(
type
,
name
,
value
,
vallen
))
==
NULL
)
{
if
((
ldif
=
ldif_put
_wrap
(
type
,
name
,
value
,
vallen
,
ldif_wrap
))
==
NULL
)
{
return
(
-
1
);
return
(
-
1
);
}
}
...
...
This diff is collapsed.
Click to expand it.
clients/tools/common.h
+
1
−
0
View file @
101090f8
...
@@ -55,6 +55,7 @@ extern int dont;
...
@@ -55,6 +55,7 @@ extern int dont;
extern
int
referrals
;
extern
int
referrals
;
extern
int
verbose
;
extern
int
verbose
;
extern
int
ldif
;
extern
int
ldif
;
extern
ber_len_t
ldif_wrap
;
extern
char
*
prog
;
extern
char
*
prog
;
/* connection */
/* connection */
...
...
This diff is collapsed.
Click to expand it.
doc/devel/args
+
1
−
1
View file @
101090f8
...
@@ -27,7 +27,7 @@ ldapwhoami * DE**HI** NO QR UVWXYZ def*h*** *nop* vwxy
...
@@ -27,7 +27,7 @@ ldapwhoami * DE**HI** NO QR UVWXYZ def*h*** *nop* vwxy
-h host
-h host
-n no-op
-n no-op
-N no (SASLprep) normalization of simple bind password
-N no (SASLprep) normalization of simple bind password
-o general
connection
options (currently nettimeout only)
-o general options (currently nettimeout
and ldif-wrap
only)
-p port
-p port
-v verbose
-v verbose
-V version
-V version
...
...
This diff is collapsed.
Click to expand it.
libraries/liblutil/ldif.c
+
1
−
1
View file @
101090f8
...
@@ -742,7 +742,7 @@ ldif_put_wrap(
...
@@ -742,7 +742,7 @@ ldif_put_wrap(
}
}
p
=
buf
;
p
=
buf
;
ldif_sput
(
&
p
,
type
,
name
,
val
,
vlen
);
ldif_sput
_wrap
(
&
p
,
type
,
name
,
val
,
vlen
,
wrap
);
*
p
=
'\0'
;
*
p
=
'\0'
;
return
(
buf
);
return
(
buf
);
...
...
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