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
openldap
OpenLDAP
Commits
0c67c049
Commit
0c67c049
authored
Apr 15, 2003
by
Pierangelo Masarati
Browse files
more cleanup; small improvements
parent
1f400adc
Changes
4
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-sql/bind.c
View file @
0c67c049
...
...
@@ -29,6 +29,7 @@ backsql_bind( Operation *op, SlapReply *rs )
Entry
*
e
,
user_entry
;
Attribute
*
a
;
backsql_srch_info
bsi
;
AttributeName
anlist
[
2
];
int
rc
;
Debug
(
LDAP_DEBUG_TRACE
,
"==>backsql_bind()
\n
"
,
0
,
0
,
0
);
...
...
@@ -74,8 +75,11 @@ backsql_bind( Operation *op, SlapReply *rs )
return
1
;
}
anlist
[
0
].
an_name
=
password
->
ad_cname
;
anlist
[
0
].
an_desc
=
password
;
anlist
[
1
].
an_name
.
bv_val
=
NULL
;
backsql_init_search
(
&
bsi
,
&
op
->
o_req_ndn
,
LDAP_SCOPE_BASE
,
-
1
,
-
1
,
-
1
,
NULL
,
dbh
,
op
,
NULL
);
-
1
,
-
1
,
-
1
,
NULL
,
dbh
,
op
,
anlist
);
e
=
backsql_id2entry
(
&
bsi
,
&
user_entry
,
&
user_id
);
if
(
e
==
NULL
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"backsql_bind(): "
...
...
servers/slapd/back-sql/entry-id.c
View file @
0c67c049
...
...
@@ -370,8 +370,6 @@ backsql_id2entry( backsql_srch_info *bsi, Entry *e, backsql_entryID *eid )
e
->
e_attrs
=
NULL
;
e
->
e_private
=
NULL
;
/* if ( bsi->base_dn != NULL)??? */
e
->
e_id
=
eid
->
id
;
if
(
bsi
->
attrs
!=
NULL
)
{
...
...
@@ -380,16 +378,7 @@ backsql_id2entry( backsql_srch_info *bsi, Entry *e, backsql_entryID *eid )
for
(
i
=
0
;
bsi
->
attrs
[
i
].
an_name
.
bv_val
;
i
++
)
{
AttributeName
*
attr
=
&
bsi
->
attrs
[
i
];
if
(
attr
->
an_desc
==
ad_oc
#if 0 /* FIXME: what is 0.10 ? */
|| !BACKSQL_NCMP( &attr->an_name, &bv_n_0_10 )
#endif
)
{
#if 0
backsql_entry_addattr( bsi->e,
&bv_n_objectclass,
BACKSQL_OC_NAME( bsi->oc ) );
#endif
if
(
attr
->
an_desc
==
ad_oc
)
{
continue
;
}
...
...
@@ -438,10 +427,12 @@ backsql_id2entry( backsql_srch_info *bsi, Entry *e, backsql_entryID *eid )
return
NULL
;
}
if
(
bsi
->
bsi_flags
|
BSQL_SF_ALL_OPER
if
(
(
bsi
->
bsi_flags
|
BSQL_SF_ALL_OPER
)
||
an_find
(
bsi
->
attrs
,
&
AllOper
)
)
{
if
(
attr_merge_normalize_one
(
bsi
->
e
,
ad_soc
,
&
soc
,
bsi
->
op
->
o_tmpmemctx
)
)
{
rc
=
attr_merge_normalize_one
(
bsi
->
e
,
slap_schema
.
si_ad_structuralObjectClass
,
&
soc
,
bsi
->
op
->
o_tmpmemctx
);
if
(
rc
!=
LDAP_SUCCESS
)
{
entry_free
(
e
);
return
NULL
;
}
...
...
servers/slapd/back-sql/other.c
View file @
0c67c049
...
...
@@ -57,7 +57,7 @@ backsql_compare( Operation *op, SlapReply *rs )
anlist
[
0
].
an_desc
=
op
->
oq_compare
.
rs_ava
->
aa_desc
;
anlist
[
1
].
an_name
.
bv_val
=
NULL
;
backsql_init_search
(
&
bsi
,
&
op
->
o_req_ndn
,
LDAP_SCOPE_BASE
,
-
1
,
-
1
,
-
1
,
NULL
,
dbh
,
op
,
anlist
);
-
1
,
-
1
,
-
1
,
NULL
,
dbh
,
op
,
anlist
);
e
=
backsql_id2entry
(
&
bsi
,
&
user_entry
,
&
user_id
);
if
(
e
==
NULL
)
{
Debug
(
LDAP_DEBUG_TRACE
,
"backsql_compare(): "
...
...
servers/slapd/back-sql/search.c
View file @
0c67c049
...
...
@@ -84,7 +84,7 @@ backsql_attrlist_add( backsql_srch_info *bsi, AttributeDescription *ad )
void
backsql_init_search
(
backsql_srch_info
*
bsi
,
struct
berval
*
n
base
,
struct
berval
*
base
,
int
scope
,
int
slimit
,
int
tlimit
,
...
...
@@ -96,7 +96,7 @@ backsql_init_search(
{
AttributeName
*
p
;
bsi
->
base_dn
=
n
base
;
bsi
->
base_dn
=
base
;
bsi
->
scope
=
scope
;
bsi
->
slimit
=
slimit
;
bsi
->
tlimit
=
tlimit
;
...
...
@@ -989,20 +989,6 @@ backsql_oc_get_candidates( void *v_oc, void *v_bsi )
int
backsql_search
(
Operation
*
op
,
SlapReply
*
rs
)
/*
BackendDB *be,
Connection *conn,
Operation *op,
struct berval *base,
struct berval *nbase,
int scope,
int deref,
int slimit,
int tlimit,
Filter *filter,
struct berval *filterstr,
AttributeName *attrs,
int attrsonly ) */
{
backsql_info
*
bi
=
(
backsql_info
*
)
op
->
o_bd
->
be_private
;
SQLHDBC
dbh
;
...
...
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