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
Tero Saarni
OpenLDAP
Commits
3c33478e
Commit
3c33478e
authored
Nov 21, 2009
by
Quanah Gibson-Mount
Browse files
ITS#6392
parent
0dc5fbe9
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
3c33478e
...
...
@@ -12,6 +12,7 @@ OpenLDAP 2.4.20 Engineering
Added slapd handling of hex server IDs (ITS#6297)
Added slapd syncrepl contextCSN storing in subentry (ITS#6373)
Fixed slapd asserts in minimal environment (ITS#6361)
Fixed slapd authid-rewrite parsing (ITS#6392)
Fixed slapd configArgs initialization (ITS#6363)
Fixed slapd debug handling of LDAP_DEBUG_ANY (ITS#6324)
Fixed slapd db_open with connection_fake_init (ITS#6381)
...
...
servers/slapd/bconfig.c
View file @
3c33478e
...
...
@@ -2010,29 +2010,40 @@ sortval_reject:
case
CFG_REWRITE
:
{
struct
berval
bv
;
char
*
line
;
int
rc
=
0
;
if
(
c
->
op
==
LDAP_MOD_ADD
)
{
c
->
argv
++
;
c
->
argc
--
;
}
if
(
slap_sasl_rewrite_config
(
c
->
fname
,
c
->
lineno
,
c
->
argc
,
c
->
argv
))
return
(
1
);
rc
=
1
;
if
(
rc
==
0
)
{
if
(
c
->
argc
>
1
)
{
char
*
s
;
if
(
c
->
argc
>
1
)
{
char
*
s
;
/* quote all args but the first */
line
=
ldap_charray2str
(
c
->
argv
,
"
\"
\"
"
);
ber_str2bv
(
line
,
0
,
0
,
&
bv
);
s
=
ber_bvchr
(
&
bv
,
'"'
);
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
]
=
'"'
;
/* quote all args but the first */
line
=
ldap_charray2str
(
c
->
argv
,
"
\"
\"
"
);
ber_str2bv
(
line
,
0
,
0
,
&
bv
);
s
=
ber_bvchr
(
&
bv
,
'"'
);
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
);
}
else
{
ber_str2bv
(
c
->
argv
[
0
],
0
,
1
,
&
bv
);
}
ber_bvarray_add
(
&
authz_rewrites
,
&
bv
);
}
ber_bvarray_add
(
&
authz_rewrites
,
&
bv
);
if
(
c
->
op
==
LDAP_MOD_ADD
)
{
c
->
argv
--
;
c
->
argc
++
;
}
return
rc
;
}
break
;
#endif
...
...
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