Commit 53709873 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Rework root dse and other info entry codes to produce entry

to caller (do_search) such that info can be used by other
operations (ie: do_compare).
parent a1430fdf
......@@ -30,12 +30,9 @@
* no mutex protection in here - take our chances!
*/
void
int
config_info(
Connection *conn,
Operation *op,
char **attrs,
int attrsonly )
Entry **entry, char **text )
{
Entry *e;
char buf[BUFSIZ];
......@@ -54,6 +51,18 @@ config_info(
(void) dn_normalize( e->e_ndn );
e->e_private = NULL;
val.bv_val = "top";
val.bv_len = sizeof("top")-1;
attr_merge( e, "objectClass", vals );
val.bv_val = "LDAPsubentry";
val.bv_len = sizeof("LDAPsubentry")-1;
attr_merge( e, "objectClass", vals );
val.bv_val = "extensibleObject";
val.bv_len = sizeof("extensibleObject")-1;
attr_merge( e, "objectClass", vals );
{
char *rdn = ch_strdup( SLAPD_CONFIG_DN );
val.bv_val = strchr( rdn, '=' );
......@@ -79,24 +88,8 @@ config_info(
attr_merge( e, "database", vals );
}
val.bv_val = "top";
val.bv_len = sizeof("top")-1;
attr_merge( e, "objectClass", vals );
val.bv_val = "LDAPsubentry";
val.bv_len = sizeof("LDAPsubentry")-1;
attr_merge( e, "objectClass", vals );
val.bv_val = "extensibleObject";
val.bv_len = sizeof("extensibleObject")-1;
attr_merge( e, "objectClass", vals );
send_search_entry( &backends[0], conn, op, e,
attrs, attrsonly, NULL );
send_search_result( conn, op, LDAP_SUCCESS,
NULL, NULL, NULL, NULL, 1 );
entry_free( e );
*entry = e;
return LDAP_SUCCESS;
}
#endif /* slapd_config_dn */
......@@ -27,12 +27,10 @@
#if defined( SLAPD_MONITOR_DN )
void
int
monitor_info(
Connection *conn,
Operation *op,
char ** attrs,
int attrsonly )
Entry **entry,
char **text )
{
Entry *e;
char buf[BUFSIZ];
......@@ -58,6 +56,18 @@ monitor_info(
(void) dn_normalize( e->e_ndn );
e->e_private = NULL;
val.bv_val = "top";
val.bv_len = sizeof("top")-1;
attr_merge( e, "objectClass", vals );
val.bv_val = "LDAPsubentry";
val.bv_len = sizeof("LDAPsubentry")-1;
attr_merge( e, "objectClass", vals );
val.bv_val = "extensibleObject";
val.bv_len = sizeof("extensibleObject")-1;
attr_merge( e, "objectClass", vals );
{
char *rdn = ch_strdup( SLAPD_MONITOR_DN );
val.bv_val = strchr( rdn, '=' );
......@@ -251,24 +261,8 @@ monitor_info(
attr_merge( e, "concurrency", vals );
#endif
val.bv_val = "top";
val.bv_len = sizeof("top")-1;
attr_merge( e, "objectClass", vals );
val.bv_val = "LDAPsubentry";
val.bv_len = sizeof("LDAPsubentry")-1;
attr_merge( e, "objectClass", vals );
val.bv_val = "extensibleObject";
val.bv_len = sizeof("extensibleObject")-1;
attr_merge( e, "objectClass", vals );
send_search_entry( &backends[0], conn, op, e,
attrs, attrsonly, NULL );
send_search_result( conn, op, LDAP_SUCCESS,
NULL, NULL, NULL, NULL, 1 );
entry_free( e );
*entry = e;
return LDAP_SUCCESS;
}
#endif /* slapd_monitor_dn */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment