Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Subject | Re: Locking NFS files on kernels 2.4.19 and 2.4.20 | From | Trond Myklebust <> | Date | 09 Jun 2003 19:05:01 +0200 |
| |
>>>>> " " == Bob Vickers <bobv@cs.rhul.ac.uk> writes:
> I have recently upgraded some machines and have found that it > is no longer possible to lock files on NFS file systems. It is > definitely a client-side problem: upgraded clients could no > longer lock files on *any* NFS server (including Tru64 as well > as a variety of Linux servers).
Two questions:
Are you running statd on the client and server?
if no, then you should...
Does SuSE compile statd with or without the RESTRICTED_STATD flag?
If the latter, then you'll need an extra kernel patch in order to allow the kernel NSM to use a reserved port. Something like the appended scheme...
Cheers, Trond
--- linux/fs/lockd/mon.c.orig 2002-02-04 23:49:27.000000000 -0800 +++ linux/fs/lockd/mon.c 2003-06-09 10:02:57.000000000 -0700 @@ -105,12 +105,19 @@ struct rpc_xprt *xprt; struct rpc_clnt *clnt = NULL; struct sockaddr_in sin; + uid_t saved_fsuid = current->fsuid; + kernel_cap_t saved_cap = current->cap_effective; sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); sin.sin_port = 0; + /* Create RPC socket as root user so we get a priv port */ + current->fsuid = 0; + cap_raise (current->cap_effective, CAP_NET_BIND_SERVICE); xprt = xprt_create_proto(IPPROTO_UDP, &sin, NULL); + current->fsuid = saved_fsuid; + current->cap_effective = saved_cap; if (!xprt) goto out; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |