-stable review patch. If anyone has any objections, please let us know. ------------------
The interface needs much redesigning if we wish to allow normal users to do this in some way. Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> Signed-off-by: "David S. Miller" <[EMAIL PROTECTED]> Signed-off-by: Chris Wright <[EMAIL PROTECTED]> --- net/ipv4/ip_sockglue.c | 3 +++ net/ipv6/ipv6_sockglue.c | 3 +++ 2 files changed, 6 insertions(+) Index: linux-2.6.12.y/net/ipv4/ip_sockglue.c =================================================================== --- linux-2.6.12.y.orig/net/ipv4/ip_sockglue.c +++ linux-2.6.12.y/net/ipv4/ip_sockglue.c @@ -848,6 +848,9 @@ mc_msf_out: case IP_IPSEC_POLICY: case IP_XFRM_POLICY: + err = -EPERM; + if (!capable(CAP_NET_ADMIN)) + break; err = xfrm_user_policy(sk, optname, optval, optlen); break; Index: linux-2.6.12.y/net/ipv6/ipv6_sockglue.c =================================================================== --- linux-2.6.12.y.orig/net/ipv6/ipv6_sockglue.c +++ linux-2.6.12.y/net/ipv6/ipv6_sockglue.c @@ -503,6 +503,9 @@ done: break; case IPV6_IPSEC_POLICY: case IPV6_XFRM_POLICY: + retv = -EPERM; + if (!capable(CAP_NET_ADMIN)) + break; retv = xfrm_user_policy(sk, optname, optval, optlen); break; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/