]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/capability.h
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
[linux-2.6-omap-h63xx.git] / include / linux / capability.h
index d567af247ed840271d5f4dfd6c6d5172a5aef74f..02bdb768d43b8dc980bdabd38e0784355f71eaf1 100644 (file)
@@ -53,6 +53,7 @@ typedef struct __user_cap_data_struct {
 #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX
 
 #define VFS_CAP_REVISION_MASK  0xFF000000
+#define VFS_CAP_REVISION_SHIFT 24
 #define VFS_CAP_FLAGS_MASK     ~VFS_CAP_REVISION_MASK
 #define VFS_CAP_FLAGS_EFFECTIVE        0x000001
 
@@ -518,8 +519,6 @@ 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;
 
-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
@@ -530,10 +529,28 @@ kernel_cap_t cap_set_effective(const kernel_cap_t pE_new);
  *
  * Note that this does not set PF_SUPERPRIV on the task.
  */
-#define has_capability(t, cap) (security_capable((t), (cap)) == 0)
+#define has_capability(t, cap) (security_real_capable((t), (cap)) == 0)
+
+/**
+ * has_capability_noaudit - Determine if a task has a superior capability available (unaudited)
+ * @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, but don't write an audit message for the
+ * check.
+ *
+ * Note that this does not set PF_SUPERPRIV on the task.
+ */
+#define has_capability_noaudit(t, cap) \
+       (security_real_capable_noaudit((t), (cap)) == 0)
 
 extern int capable(int cap);
 
+/* audit system wants to get cap info from files as well */
+struct dentry;
+extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps);
+
 #endif /* __KERNEL__ */
 
 #endif /* !_LINUX_CAPABILITY_H */