summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2011-01-03 15:12:19 -0500
committerNalin Dahyabhai <nalin@redhat.com>2011-01-03 15:12:19 -0500
commit4ee11dbf9843fc72f3cfc647aa7e865c056aa38a (patch)
tree9bfbdfd460e9fd511a8b0221de275c829f0d650b
parent34837e588682c5c0704db78b97fd41b9b808614f (diff)
downloadslapi-nis-4ee11dbf9843fc72f3cfc647aa7e865c056aa38a.tar.gz
slapi-nis-4ee11dbf9843fc72f3cfc647aa7e865c056aa38a.tar.xz
slapi-nis-4ee11dbf9843fc72f3cfc647aa7e865c056aa38a.zip
- check for errors building a no-such-map or no-such-domain response
packet before sending it in response to yp_all (defect #10090)
-rw-r--r--src/nis.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/nis.c b/src/nis.c
index 023dc3c..4629bb8 100644
--- a/src/nis.c
+++ b/src/nis.c
@@ -563,14 +563,24 @@ nis_all(struct plugin_state *state,
xdr_replymsg(reply_xdrs, reply);
/* End of data. */
reply_all->more = FALSE;
- xdr_ypresp_all(reply_xdrs, reply_all);
- /* Queue the entire response. */
- if (!(*reply_fragment_fn)(state, cdata,
- reply, reply_xdrs,
- FALSE, TRUE)) {
+ if (xdr_ypresp_all(reply_xdrs, reply_all)) {
+ /* Queue the entire response. */
+ if (!(*reply_fragment_fn)(state, cdata,
+ reply, reply_xdrs,
+ FALSE, TRUE)) {
+ slapi_log_error(SLAPI_LOG_PLUGIN,
+ state->plugin_desc->spd_id,
+ "all(%s/%s) - "
+ "error queueing "
+ "error response\n",
+ req_nokey.domain,
+ req_nokey.map);
+ }
+ } else {
slapi_log_error(SLAPI_LOG_PLUGIN,
state->plugin_desc->spd_id,
- "all(%s/%s) - error queueing "
+ "all(%s/%s) - "
+ "error building "
"error response\n",
req_nokey.domain,
req_nokey.map);