]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
uvesafb/connector: Disallow unpliviged users to send netlink packets
authorPhilipp Reisner <philipp.reisner@linbit.com>
Tue, 13 Oct 2009 09:28:18 +0000 (11:28 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Oct 2009 22:11:56 +0000 (15:11 -0700)
(cherry picked from commit 30efa3f76813b17445bc5a2e443ae9731518566b)

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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;
 
+       if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN))
+               return;
+
        if (msg->seq >= UVESAFB_TASKS_MAX)
                return;