diff options
| author | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-06-09 13:38:39 -0400 |
|---|---|---|
| committer | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-06-09 13:38:39 -0400 |
| commit | 68aa41b079b6e37adb6e0c3f39e5ccb349b282d7 (patch) | |
| tree | 8872901e20e702aee0c734e7471ebfd75cb982fe /src/plugin.c | |
| parent | c18d714a11efc4c92b8759ff37a4ab1bf1b3409d (diff) | |
| download | slapi-nis-68aa41b079b6e37adb6e0c3f39e5ccb349b282d7.tar.gz slapi-nis-68aa41b079b6e37adb6e0c3f39e5ccb349b282d7.tar.xz slapi-nis-68aa41b079b6e37adb6e0c3f39e5ccb349b282d7.zip | |
- it seems we can't read entries during initialization
Diffstat (limited to 'src/plugin.c')
| -rw-r--r-- | src/plugin.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/src/plugin.c b/src/plugin.c index d8155c3..ab0bd3b 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -153,16 +153,6 @@ plugin_state_init(Slapi_PBlock *pb, struct plugin_state **lstate) struct plugin_state *state = NULL; struct sockaddr_in sin; struct sockaddr_in6 sin6; - Slapi_DN *sdn; - Slapi_Entry *e; - char *attrs[] = { - PLUGIN_CONFIGURATION_MAXDGRAM_ATTR, - PLUGIN_CONFIGURATION_MAXVALUE_ATTR, - PLUGIN_CONFIGURATION_PORT_ATTR, - PLUGIN_CONFIGURATION_SECURENET_ATTR, - PLUGIN_CONFIGURATION_TCPWRAPNAME_ATTR, - NULL, - }; state = malloc(sizeof(*state)); if (state == NULL) { @@ -174,17 +164,6 @@ plugin_state_init(Slapi_PBlock *pb, struct plugin_state **lstate) state->max_value_size = DEFAULT_MAX_VALUE_SIZE; state->max_dgram_size = DEFAULT_MAX_DGRAM_SIZE; slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &state->plugin_identity); - slapi_pblock_get(pb, SLAPI_TARGET_DN, &state->plugin_base); - e = NULL; - if (state->plugin_base != NULL) { - /* Make this conditional. As of this writing this isn't - * filled-in yet. */ - sdn = slapi_sdn_new_dn_byval(state->plugin_base); - slapi_search_internal_get_entry(sdn, attrs, &e, - state->plugin_identity); - slapi_sdn_free(&sdn); - sdn = NULL; - } #ifdef HAVE_TCPD_H state->request_info = malloc(sizeof(*(state->request_info))); @@ -196,9 +175,6 @@ plugin_state_init(Slapi_PBlock *pb, struct plugin_state **lstate) slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, "error initializing tcp_wrappers for \"%s\"\n", plugin_description.spd_id); - if (e != NULL) { - slapi_entry_free(e); - } return -1; } #else @@ -221,12 +197,7 @@ plugin_state_init(Slapi_PBlock *pb, struct plugin_state **lstate) /* We need to bind on privileged ports for both datagram and connected * listeners, over both IPv4 and IPv6. */ state->n_listeners = 0; - if (e != NULL) { - port = slapi_entry_attr_get_int(e, - PLUGIN_CONFIGURATION_PORT_ATTR); - } else { - port = 0; - } + port = 0; for (i = 0; i < 2; i++) { int pf, type, one, flags, ret; const char *sock_desc; @@ -328,15 +299,9 @@ plugin_state_init(Slapi_PBlock *pb, struct plugin_state **lstate) slapi_log_error(SLAPI_LOG_PLUGIN, plugin_description.spd_id, "set up %d listening sockets\n", state->n_listeners); - if (e != NULL) { - slapi_entry_free(e); - } *lstate = state; return 0; failed: - if (e != NULL) { - slapi_entry_free(e); - } err = errno; free(state); errno = err; |
