diff -X /home/cel/src/linux/dont-diff -Naurp 01-odirect-isem/net/sunrpc/auth_unix.c 02-call_encode/net/sunrpc/auth_unix.c --- 01-odirect-isem/net/sunrpc/auth_unix.c 2004-02-17 22:58:26.000000000 -0500 +++ 02-call_encode/net/sunrpc/auth_unix.c 2004-02-20 17:18:00.000000000 -0500 @@ -13,6 +13,7 @@ #include #include #include +#include #define NFS_NGROUPS 16 @@ -149,19 +150,14 @@ unx_marshal(struct rpc_task *task, u32 * struct rpc_clnt *clnt = task->tk_client; struct unx_cred *cred = (struct unx_cred *) task->tk_msg.rpc_cred; u32 *base, *hold; - int i, n; + int i; *p++ = htonl(RPC_AUTH_UNIX); base = p++; *p++ = htonl(jiffies/HZ); - /* - * Copy the UTS nodename captured when the client was created. - */ - n = clnt->cl_nodelen; - *p++ = htonl(n); - memcpy(p, clnt->cl_nodename, n); - p += (n + 3) >> 2; + /* Copy the UTS nodename captured when the client was created */ + p = xdr_encode_array(p, clnt->cl_nodename, clnt->cl_nodelen); /* Note: we don't use real uid if it involves raising privilege */ if (ruid && cred->uc_puid != 0 && cred->uc_pgid != 0) { diff -X /home/cel/src/linux/dont-diff -Naurp 01-odirect-isem/net/sunrpc/clnt.c 02-call_encode/net/sunrpc/clnt.c --- 01-odirect-isem/net/sunrpc/clnt.c 2004-02-17 22:57:29.000000000 -0500 +++ 02-call_encode/net/sunrpc/clnt.c 2004-02-20 17:18:00.000000000 -0500 @@ -611,9 +611,6 @@ call_encode(struct rpc_task *task) rcvbuf->page_len = 0; rcvbuf->len = bufsiz; - /* Zero buffer so we have automatic zero-padding of opaque & string */ - memset(task->tk_buffer, 0, bufsiz); - /* Encode header and provided arguments */ encode = task->tk_msg.rpc_proc->p_encode; if (!(p = call_header(task))) {