Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e50a906e authored by Eric Paris's avatar Eric Paris Committed by James Morris
Browse files

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: default avatarEric Paris <eparis@redhat.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 2b828925
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);