From: Philipp Reisner Date: Fri, 2 Oct 2009 02:40:10 +0000 (+0000) Subject: pohmelfs/connector: Disallow unpliviged users to configure pohmelfs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=98a5783af02f4c9b87b676d7bbda6258045cfc76;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git pohmelfs/connector: Disallow unpliviged users to configure pohmelfs Signed-off-by: Philipp Reisner Signed-off-by: David S. Miller --- diff --git a/drivers/staging/pohmelfs/config.c b/drivers/staging/pohmelfs/config.c index c9162b3f0bf3..5d04bf5b021a 100644 --- a/drivers/staging/pohmelfs/config.c +++ b/drivers/staging/pohmelfs/config.c @@ -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: