Merge branch 'i7300_idle' into test
[safe/jmp/linux-2.6] / include / linux / capability.h
index fa830f8..9d1fe30 100644 (file)
@@ -501,8 +501,21 @@ extern const kernel_cap_t __cap_empty_set;
 extern const kernel_cap_t __cap_full_set;
 extern const kernel_cap_t __cap_init_eff_set;
 
-int capable(int cap);
-int __capable(struct task_struct *t, int cap);
+kernel_cap_t cap_set_effective(const kernel_cap_t pE_new);
+
+/**
+ * has_capability - Determine if a task has a superior capability available
+ * @t: The task in question
+ * @cap: The capability to be tested for
+ *
+ * Return true if the specified task has the given superior capability
+ * currently in effect, false if not.
+ *
+ * Note that this does not set PF_SUPERPRIV on the task.
+ */
+#define has_capability(t, cap) (security_capable((t), (cap)) == 0)
+
+extern int capable(int cap);
 
 #endif /* __KERNEL__ */