aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2008-11-13 18:37:25 -0500
committerJames Morris <jmorris@namei.org>2008-11-14 16:50:52 -0500
commite50a906e0200084f04f8f3b7c3a14b0442d1347f (patch)
tree125b64c41d4a81f0fa67808ba6a4673b1be339c5
parent2b828925652340277a889cbc11b2d0637f7cdaf7 (diff)
capabilities: define get_vfs_caps_from_disk when file caps are not enabled
When CONFIG_SECURITY_FILE_CAPABILITIES is not set the audit system may try to call into the capabilities function vfs_cap_from_file. This patch defines that function so kernels can build and work. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
-rw-r--r--security/commoncap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 19cb398431ee..79713545cd63 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -413,6 +413,12 @@ int cap_inode_killpriv(struct dentry *dentry)
413 return 0; 413 return 0;
414} 414}
415 415
416int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps)
417{
418 memset(cpu_caps, 0, sizeof(struct cpu_vfs_cap_data));
419 return -ENODATA;
420}
421
416static inline int get_file_caps(struct linux_binprm *bprm, bool *effective) 422static inline int get_file_caps(struct linux_binprm *bprm, bool *effective)
417{ 423{
418 bprm_clear_caps(bprm); 424 bprm_clear_caps(bprm);