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
642b788f
Commit
642b788f
authored
19 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
fix printing a NULL value (ITS#3698)
parent
a7b82686
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
servers/slapd/back-meta/map.c
+2
-1
2 additions, 1 deletion
servers/slapd/back-meta/map.c
servers/slapd/back-meta/suffixmassage.c
+17
-19
17 additions, 19 deletions
servers/slapd/back-meta/suffixmassage.c
with
19 additions
and
20 deletions
servers/slapd/back-meta/map.c
+
2
−
1
View file @
642b788f
...
...
@@ -544,7 +544,8 @@ ldap_back_filter_map_rewrite(
}
Debug
(
LDAP_DEBUG_ARGS
,
"[rw] %s:
\"
%s
\"
->
\"
%s
\"\n
"
,
fdc
.
ctx
,
ftmp
.
bv_val
,
fstr
->
bv_val
);
fdc
.
ctx
,
BER_BVISNULL
(
&
ftmp
)
?
""
:
ftmp
.
bv_val
,
BER_BVISNULL
(
fstr
)
?
""
:
fstr
->
bv_val
);
rc
=
LDAP_SUCCESS
;
break
;
...
...
This diff is collapsed.
Click to expand it.
servers/slapd/back-meta/suffixmassage.c
+
17
−
19
View file @
642b788f
...
...
@@ -61,15 +61,15 @@
#ifdef ENABLE_REWRITE
int
ldap_back_dn_massage
(
dncookie
*
dc
,
struct
berval
*
dn
,
struct
berval
*
res
)
dncookie
*
dc
,
struct
berval
*
dn
,
struct
berval
*
res
)
{
int
rc
=
0
;
int
rc
=
0
;
static
char
*
dmy
=
""
;
switch
(
rewrite_session
(
dc
->
rwmap
->
rwm_rw
,
dc
->
ctx
,
(
dn
->
bv_
len
?
dn
->
bv_val
:
""
),
(
dn
->
bv_
val
?
dn
->
bv_val
:
dmy
),
dc
->
conn
,
&
res
->
bv_val
)
)
{
case
REWRITE_REGEXEC_OK
:
...
...
@@ -78,13 +78,11 @@ ldap_back_dn_massage(
}
else
{
*
res
=
*
dn
;
}
#ifdef NEW_LOGGING
LDAP_LOG
(
BACK_LDAP
,
DETAIL1
,
"[rw] %s:
\"
%s
\"
->
\"
%s
\"\n
"
,
dc
->
ctx
,
dn
->
bv_val
,
res
->
bv_val
);
#else
/* !NEW_LOGGING */
Debug
(
LDAP_DEBUG_ARGS
,
"[rw] %s:
\"
%s
\"
->
\"
%s
\"\n
"
,
dc
->
ctx
,
dn
->
bv_val
,
res
->
bv_val
);
#endif
/* !NEW_LOGGING */
"[rw] %s:
\"
%s
\"
->
\"
%s
\"\n
"
,
dc
->
ctx
,
BER_BVISNULL
(
dn
)
?
""
:
dn
->
bv_val
,
BER_BVISNULL
(
res
)
?
""
:
res
->
bv_val
);
rc
=
LDAP_SUCCESS
;
break
;
...
...
@@ -104,6 +102,11 @@ ldap_back_dn_massage(
rc
=
LDAP_OTHER
;
break
;
}
if
(
res
->
bv_val
==
dmy
)
{
BER_BVZERO
(
res
);
}
return
rc
;
}
...
...
@@ -168,16 +171,11 @@ ldap_back_dn_massage(
res
->
bv_val
=
ch_malloc
(
res
->
bv_len
+
1
);
strncpy
(
res
->
bv_val
,
dn
->
bv_val
,
diff
);
strcpy
(
&
res
->
bv_val
[
diff
],
dc
->
rwmap
->
rwm_suffix_massage
[
i
+
dst
].
bv_val
);
#ifdef NEW_LOGGING
LDAP_LOG
(
BACK_LDAP
,
ARGS
,
"ldap_back_dn_massage: converted
\"
%s
\"
to
\"
%s
\"\n
"
,
dn
->
bv_val
,
res
->
bv_val
,
0
);
#else
Debug
(
LDAP_DEBUG_ARGS
,
"ldap_back_dn_massage:"
" converted
\"
%s
\"
to
\"
%s
\"\n
"
,
dn
->
bv_val
,
res
->
bv_val
,
0
);
#endif
BER_BVISNULL
(
dn
)
?
""
:
dn
->
bv_val
,
BER_BVISNULL
(
res
)
?
""
:
res
->
bv_val
,
0
);
break
;
}
}
...
...
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