uvesafb/connector: Disallow unpliviged users to send netlink packets
authorPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 2 Oct 2009 02:40:11 +0000 (02:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2009 17:54:18 +0000 (10:54 -0700)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/video/uvesafb.c

index aa7cd95..e35232a 100644 (file)
@@ -72,6 +72,9 @@ static void uvesafb_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *ns
        struct uvesafb_task *utask;
        struct uvesafb_ktask *task;
 
+       if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN))
+               return;
+
        if (msg->seq >= UVESAFB_TASKS_MAX)
                return;