From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Bob Vickers <R.Vickers@cs.rhul.ac.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Locking NFS files on kernels 2.4.19 and 2.4.20
Date: 09 Jun 2003 19:05:01 +0200 [thread overview]
Message-ID: <shsd6hnrxky.fsf@charged.uio.no> (raw)
In-Reply-To: <Pine.OSF.4.44.0306091347560.4682-100000@sartre.cs.rhbnc.ac.uk>
>>>>> " " == 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;
next prev parent reply other threads:[~2003-06-09 16:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-09 13:25 Locking NFS files on kernels 2.4.19 and 2.4.20 Bob Vickers
2003-06-09 17:05 ` Trond Myklebust [this message]
2003-06-10 10:17 ` Bob Vickers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=shsd6hnrxky.fsf@charged.uio.no \
--to=trond.myklebust@fys.uio.no \
--cc=R.Vickers@cs.rhul.ac.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox