]> git.decadent.org.uk Git - nfs-utils.git/commit
libnsm.a: retain CAP_NET_BIND when dropping privileges
authorChuck Lever <chuck.lever@oracle.com>
Thu, 14 Jan 2010 17:24:34 +0000 (12:24 -0500)
committerSteve Dickson <steved@redhat.com>
Fri, 15 Jan 2010 19:55:52 +0000 (14:55 -0500)
commite2446fda6e7cdb1b9462162b81b0e50fd6efaf56
treef1a6bedafb0fc506cc0cccd8848a13d421a70afb
parentd16bd0400fc096ec2fed36d5dfa8620b2370e4d1
libnsm.a: retain CAP_NET_BIND when dropping privileges

I'm about to switch the order of listener creation and dropping root
privileges.  rpc.statd will drop privileges first, then create its
listeners.  The reason for the new ordering is explained in a
subsequent patch.

However, for non-TI-RPC builds, rpc_init() needs to use a privileged
port to do pmap registrations.  For both TI-RPC and non-TI-RPC builds,
CAP_NET_BIND is required in case the admin requests a privileged
listener port on the statd command line.

So that these requirements are met, nsm_drop_privileges() will now
retain CAP_NET_BIND while dropping root.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
aclocal/libcap.m4 [new file with mode: 0644]
configure.ac
support/nsm/file.c
utils/statd/Makefile.am