2005-01-14 Tom Yu <tlyu@mit.edu>
+ * xdr.c (xdr_bytes): Revert previous; the problem was actually in
+ xdr_rpc_gss_buf.
+
* authgss_prot.c (xdr_rpc_gss_wrap_data): Use xdr_alloc to avoid
size limit issues. Use (unsigned int)-1 instead of MAX_NETOBJ_SZ.
(xdr_rpc_gss_unwrap_data): Use (unsigned int)-1 instead of
MAX_NETOBJ_SZ.
+ (xdr_rpc_gss_buf): Set tmplen even if doing XDR_FREE.
* xdr.c (xdr_bytes): Don't assign from *sizep if XDR_FREE, since
it'll be uninitialized then. Shuts up Purify.
bool_t xdr_stat;
u_int tmplen;
- if (xdrs->x_op == XDR_ENCODE) {
+ if (xdrs->x_op != XDR_DECODE) {
if (buf->length > UINT_MAX)
return (FALSE);
else
if (! xdr_u_int(xdrs, sizep)) {
return (FALSE);
}
- if ((xdrs->x_op != XDR_FREE) && (*sizep > maxsize)) {
+ nodesize = *sizep;
+ if ((nodesize > maxsize) && (xdrs->x_op != XDR_FREE)) {
return (FALSE);
- } else {
- nodesize = *sizep;
}
/*
+2005-01-14 Tom Yu <tlyu@mit.edu>
+
+ * kadmin.exp (kadmin_list): Check for communication failure.
+ (kadmin_test): Create a large number of principals, then attempt
+ to list, in order to check for fixed-size buffer problems in
+ RPCSEC_GSS.
+
2005-01-11 Ken Raeburn <raeburn@mit.edu>
* gssftp.exp (start_ftp_daemon): Use built-in sleep command.
catch "expect_after"
return 0
}
+ "Communication failure" {
+ fail "kadmin ldb got RPC error"
+ catch "expect_after"
+ return 0
+ }
timeout {
fail "kadmin ldb"
catch "expect_after"
expect -re "assword\[^\r\n\]*: *" {
send "adminpass$KEY\r"
}
- expect -re "\(.*@$REALMNAME\r\n\)*"
+ expect -re "\(.*@$REALMNAME\r\n\)+"
expect_after
expect eof
set k_stat [wait -i $spawn_id]
return
}
+ # test retrieval of large number of principals
+ # bug [2877]
+ for { set i 0 } { $i < 200 } { incr i } {
+ if { ![kadmin_add "foo$i" foopass] } {
+ return
+ }
+ }
+
+ if { ![kadmin_list] } {
+ return
+ }
verbose "kadmin_test succeeded"
}