Skip to contentSkip to conversation

xdr_rejected_reply: Don't crash with invalid server rejection

PATCH In review Steve Dickson 1 participant 2 messages Jun 5, 2014 – Jun 18, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xdr_rejected_reply: Don't crash with invalid server rejection

It seems legacy servers like to return invalid
rejection status when a RPC is rejected. This
should not crash the app then it happens.

---
 src/rpc_prot.c | 1 -
 1 file changed, 1 deletion(-)
src/rpc_prot.c +0 -1
index e562deb..5841e51 100644
@@ -150,7 +150,6 @@ xdr_rejected_reply(xdrs, rr)
 		return (xdr_enum(xdrs, (enum_t *)&(rr->rj_why)));
 	}
 	/* NOTREACHED */
-	assert(0);
 	return (FALSE);
 }
 
Signature · 1 line
1.9.0
#1 lore raw
Quoted 5 lines · Steve Dickson

It seems legacy servers like to return invalid
rejection status when a RPC is rejected. This
should not crash the app then it happens.

Committed....

steved.

Quoted 17 lines
---
 src/rpc_prot.c | 1 -
 1 file changed, 1 deletion(-)
src/rpc_prot.c +0 -1
index e562deb..5841e51 100644
@@ -150,7 +150,6 @@ xdr_rejected_reply(xdrs, rr)
 		return (xdr_enum(xdrs, (enum_t *)&(rr->rj_why)));
 	}
 	/* NOTREACHED */
-	assert(0);
 	return (FALSE);
 }