pohmelfs/connector: Disallow unpliviged users to configure pohmelfs
authorPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 2 Oct 2009 02:40:10 +0000 (02:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Oct 2009 17:54:15 +0000 (10:54 -0700)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/staging/pohmelfs/config.c

index c9162b3f0bf317c5ba42ba6f25ef3c73e2339005..5d04bf5b021a8c24b9534339ec194bc3f5659e05 100644 (file)
@@ -531,6 +531,9 @@ static void pohmelfs_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *n
 {
        int err;
 
+       if (!cap_raised(nsp->eff_cap, CAP_SYS_ADMIN))
+               return;
+
        switch (msg->flags) {
                case POHMELFS_FLAGS_ADD:
                case POHMELFS_FLAGS_DEL: