]> git.baikalelectronics.ru Git - kernel.git/commit
lockd: Add helper to sanity check incoming NOTIFY requests
authorChuck Lever <chuck.lever@oracle.com>
Fri, 3 Oct 2008 16:50:44 +0000 (12:50 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 3 Oct 2008 21:02:35 +0000 (17:02 -0400)
commit4ab61921f2a5c551d4d9fc566fe2af7563285288
treea2a6c0226ea0f72536477dff2e123245a3621d9d
parentf111b8f7a60eadfd85c842b591b9d6411b223131
lockd: Add helper to sanity check incoming NOTIFY requests

lockd accepts SM_NOTIFY calls only from a privileged process on the
local system.  If lockd uses an AF_INET6 listener, the sender's address
(ie the local rpc.statd) will be the IPv6 loopback address, not the
IPv4 loopback address.

Make sure the privilege test in nlmsvc_proc_sm_notify() and
nlm4svc_proc_sm_notify() works for both AF_INET and AF_INET6 family
addresses by refactoring the test into a helper and adding support for
IPv6 addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/lockd/svc4proc.c
fs/lockd/svcproc.c
include/linux/lockd/lockd.h