[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.00.0911050841490.6457@tundra.namei.org>
Date: Thu, 5 Nov 2009 08:42:39 +1100 (EST)
From: James Morris <jmorris@...ei.org>
To: Eric Paris <eparis@...hat.com>
cc: netdev@...r.kernel.org, nhorman@...hat.com, acme@...hat.com,
dwalsh@...hat.com, davem@...emloft.net,
linux-security-module@...r.kernel.org
Subject: Re: [PATCH 3/3] net: check kern before calling security subsystem
On Wed, 4 Nov 2009, Eric Paris wrote:
> - if (sock->type == SOCK_RAW && !capable(CAP_NET_RAW))
> + if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW))
> return -EPERM;
> - if (sock->type == SOCK_RAW && !capable(CAP_NET_RAW))
> + if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW))
> goto out_rcu_unlock;
> - if (sock->type == SOCK_RAW && !capable(CAP_NET_RAW))
> + if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW))
> goto out_rcu_unlock;
Perhaps make this a static inline.
--
James Morris
<jmorris@...ei.org>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists