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 aa7cd959cced63736721afe1ad97689dced21d82..e35232a1857199926882234faf795e61cd755cc7 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;
 
        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;
 
        if (msg->seq >= UVESAFB_TASKS_MAX)
                return;