Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
9118cfda
Commit
9118cfda
authored
Aug 11, 2007
by
Howard Chu
Browse files
ITS#5087 fix tool_id2entry_get
parent
43c1d191
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-bdb/tools.c
View file @
9118cfda
...
...
@@ -228,19 +228,22 @@ int bdb_tool_id2entry_get(
Entry
**
e
)
{
int
rc
=
bdb_id2entry
(
be
,
NULL
,
0
,
id
,
e
);
if
(
rc
==
DB_NOTFOUND
&&
id
==
0
)
{
Entry
*
dummy
=
ch_calloc
(
1
,
sizeof
(
Entry
)
);
struct
berval
gluebv
=
BER_BVC
(
"glue"
);
dummy
->
e_name
.
bv_val
=
ch_strdup
(
""
);
dummy
->
e_nname
.
bv_val
=
ch_strdup
(
""
);
attr_merge_one
(
dummy
,
slap_schema
.
si_ad_objectClass
,
&
gluebv
,
NULL
);
attr_merge_one
(
dummy
,
slap_schema
.
si_ad_structuralObjectClass
,
&
gluebv
,
NULL
);
*
e
=
dummy
;
rc
=
LDAP_SUCCESS
;
int
rc
;
ID
nid
;
BDB_ID2DISK
(
id
,
&
nid
);
key
.
ulen
=
key
.
size
=
sizeof
(
ID
);
key
.
flags
=
DB_DBT_USERMEM
;
key
.
data
=
&
nid
;
rc
=
cursor
->
c_get
(
cursor
,
&
key
,
&
data
,
DB_SET
);
if
(
rc
==
0
)
{
*
e
=
bdb_tool_entry_get
(
be
,
id
);
if
(
*
e
==
NULL
)
rc
=
LDAP_OTHER
;
}
key
.
data
=
NULL
;
return
rc
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment