Delta-cap bset-fix01.diff
diff -Nurp linux-2.6.22.19-vs2.3.0.34.1/kernel/sysctl.c linux-2.6.22.19-vs2.3.0.34.2/kernel/sysctl.c --- linux-2.6.22.19-vs2.3.0.34.1/kernel/sysctl.c 2008-03-15 13:16:10.000000000 +0100 +++ linux-2.6.22.19-vs2.3.0.34.2/kernel/sysctl.c 2008-06-16 22:25:42.000000000 +0200 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -1691,13 +1692,21 @@ int proc_dointvec_bset(ctl_table *table, void __user *buffer, size_t *lenp, loff_t *ppos) { int op; + struct vx_info *vxi; + int *bset; - if (write && !capable(CAP_SYS_MODULE)) { + if (write && !cap_raised(current->cap_effective, CAP_SYS_MODULE)) { return -EPERM; } + vxi = current_vx_info(); + if (vxi) + bset = &vxi->vx_cap_bset; + else + bset = table->data; + op = is_init(current) ? OP_SET : OP_AND; - return do_proc_dointvec(table,write,filp,buffer,lenp,ppos, + return __do_proc_dointvec(bset, table,write,filp,buffer,lenp,ppos, do_proc_dointvec_bset_conv,&op); }