Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
orbea -
OpenLDAP
Commits
c573fe70
Commit
c573fe70
authored
May 23, 2005
by
Pierangelo Masarati
Browse files
authid-rewrite*: fix parsing, rework unparsing
parent
950c9a78
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/bconfig.c
View file @
c573fe70
...
...
@@ -234,7 +234,7 @@ static ConfigTable config_back_cf_table[] = {
&
config_generic
,
"( OLcfgGlAt:5 NAME 'olcAttributeOptions' "
"EQUALITY caseIgnoreMatch "
"SYNTAX OMsDirectoryString )"
,
NULL
,
NULL
},
{
"authid-rewrite"
,
NULL
,
2
,
0
,
0
,
{
"authid-rewrite"
,
NULL
,
2
,
0
,
STRLENOF
(
"authid-rewrite"
)
,
#ifdef SLAP_AUTH_REWRITE
ARG_MAGIC
|
CFG_REWRITE
|
ARG_NO_INSERT
,
&
config_generic
,
#else
...
...
@@ -1207,9 +1207,27 @@ config_generic(ConfigArgs *c) {
#ifdef SLAP_AUTH_REWRITE
case
CFG_REWRITE
:
{
struct
berval
bv
;
char
*
line
;
if
(
slap_sasl_rewrite_config
(
c
->
fname
,
c
->
lineno
,
c
->
argc
,
c
->
argv
))
return
(
1
);
ber_str2bv
(
c
->
line
,
0
,
1
,
&
bv
);
if
(
c
->
argc
>
1
)
{
char
*
s
;
/* quote all args but the first */
line
=
ldap_charray2str
(
c
->
argv
,
"
\"
\"
"
);
ber_str2bv
(
line
,
0
,
0
,
&
bv
);
s
=
strchr
(
bv
.
bv_val
,
'"'
);
assert
(
s
!=
NULL
);
/* move the trailing quote of argv[0] to the end */
AC_MEMCPY
(
s
,
s
+
1
,
bv
.
bv_len
-
(
s
-
bv
.
bv_val
)
);
bv
.
bv_val
[
bv
.
bv_len
-
1
]
=
'"'
;
}
else
{
ber_str2bv
(
c
->
argv
[
0
],
0
,
1
,
&
bv
);
}
ber_bvarray_add
(
&
authz_rewrites
,
&
bv
);
}
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment