aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sys.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index b6941e06d5d5..9ccf713491f9 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -223,6 +223,18 @@ int unregister_reboot_notifier(struct notifier_block * nb)
223 223
224EXPORT_SYMBOL(unregister_reboot_notifier); 224EXPORT_SYMBOL(unregister_reboot_notifier);
225 225
226#ifndef CONFIG_SECURITY
227int capable(int cap)
228{
229 if (cap_raised(current->cap_effective, cap)) {
230 current->flags |= PF_SUPERPRIV;
231 return 1;
232 }
233 return 0;
234}
235EXPORT_SYMBOL(capable);
236#endif
237
226static int set_one_prio(struct task_struct *p, int niceval, int error) 238static int set_one_prio(struct task_struct *p, int niceval, int error)
227{ 239{
228 int no_nice; 240 int no_nice;