Skip to content

Commit

Permalink
capabilities: define get_vfs_caps_from_disk when file caps are not en…
Browse files Browse the repository at this point in the history
…abled

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>
  • Loading branch information
Eric Paris authored and James Morris committed Nov 14, 2008
1 parent 2b82892 commit e50a906
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions security/commoncap.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,12 @@ int cap_inode_killpriv(struct dentry *dentry)
return 0;
}

int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps)
{
memset(cpu_caps, 0, sizeof(struct cpu_vfs_cap_data));
return -ENODATA;
}

static inline int get_file_caps(struct linux_binprm *bprm, bool *effective)
{
bprm_clear_caps(bprm);
Expand Down

0 comments on commit e50a906

Please sign in to comment.