diff options
-rw-r--r-- | src/dummymap.c | 3 | ||||
-rw-r--r-- | src/map.c | 3 | ||||
-rw-r--r-- | src/map.h | 2 | ||||
-rw-r--r-- | src/nis.c | 8 |
4 files changed, 10 insertions, 6 deletions
diff --git a/src/dummymap.c b/src/dummymap.c index b6a336a..d03fe09 100644 --- a/src/dummymap.c +++ b/src/dummymap.c @@ -158,10 +158,11 @@ map_supports_map(struct plugin_state *state, bool_t map_order(struct plugin_state *state, - const char *domain, const char *map, + const char *domain, const char *map, bool_t *secure, unsigned int *order) { *order = 1; + *secure = FALSE; return TRUE; } @@ -346,13 +346,14 @@ map_master_name(struct plugin_state *state, const char **master) * decrease. */ bool_t map_order(struct plugin_state *state, - const char *domain_name, const char *map_name, + const char *domain_name, const char *map_name, bool_t *map_secure, unsigned int *order) { struct map *map; map = map_data_find_map(state, domain_name, map_name); if (map != NULL) { *order = map->last_changed & 0xffffffff; + *map_secure = map->secure; return TRUE; } else { return FALSE; @@ -49,7 +49,7 @@ bool_t map_next(struct plugin_state *state, unsigned int *next_key_len, char **next_key, unsigned int *next_value_len, char **next_value); bool_t map_order(struct plugin_state *state, - const char *domain, const char *map, + const char *domain, const char *map, bool_t *map_secure, unsigned int *order); /* Functions to push data into maps. */ void map_data_clear_map(struct plugin_state *state, @@ -272,18 +272,20 @@ nis_order(struct plugin_state *state, dispatch_reply_fragment *reply_fragment_fn, dispatch_reply *reply_fn, struct dispatch_client_data *cdata, - XDR *request_xdrs, + XDR *request_xdrs, bool_t client_secure, struct rpc_msg *reply, XDR *reply_xdrs, struct ypresp_order *reply_order) { struct ypreq_nokey req_nokey; + bool_t map_secure; memset(&req_nokey, 0, sizeof(req_nokey)); memset(reply_order, 0, sizeof(*reply_order)); if (xdr_ypreq_nokey(request_xdrs, &req_nokey)) { map_rdlock(); reply_order->status = YP_TRUE; if (map_order(state, req_nokey.domain, req_nokey.map, - &reply_order->ordernum)) { + &map_secure, &reply_order->ordernum) && + (map_secure ? client_secure : TRUE)) { reply_order->status = YP_TRUE; slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, @@ -1037,7 +1039,7 @@ nis_process_request(struct plugin_state *state, accepted->ar_results.proc = (xdrproc_t) xdr_ypresp_order; /* Call the real function. */ nis_order(state, reply_fragment_fn, reply_fn, cdata, - &request_xdrs, + &request_xdrs, client_secure, &reply, &reply_xdrs, &reply_order); goto sent_reply; break; |