NFSv4: SETCLIENTID add the format string for the NETID
authorDjalal Harouni <tixxdz@opendz.org>
Tue, 18 Jun 2013 16:58:12 +0000 (17:58 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 18 Jun 2013 17:45:01 +0000 (13:45 -0400)
Make sure that NFSv4 SETCLIENTID does not parse the NETID as a
format string.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index 65467abbd5a67f5d439b423f4526560cc53e3485..83e0e1de7ecf57561bcc0055d34152e3510f997a 100644 (file)
@@ -4369,7 +4369,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program,
        /* cb_client4 */
        rcu_read_lock();
        setclientid.sc_netid_len = scnprintf(setclientid.sc_netid,
-                               sizeof(setclientid.sc_netid),
+                               sizeof(setclientid.sc_netid), "%s",
                                rpc_peeraddr2str(clp->cl_rpcclient,
                                                        RPC_DISPLAY_NETID));
        rcu_read_unlock();