mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
fs: Export in_group_or_capable()
Export in_group_or_capable() as a VFS helper function. Signed-off-by: Youling Tang <tangyouling@kylinos.cn> Link: https://lore.kernel.org/r/20240620032335.147136-1-youling.tang@linux.dev Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
5e362bd5ee
commit
9b6a14f08b
@ -17,8 +17,6 @@
|
||||
#include <linux/filelock.h>
|
||||
#include <linux/security.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
/**
|
||||
* setattr_should_drop_sgid - determine whether the setgid bit needs to be
|
||||
* removed
|
||||
|
@ -2538,6 +2538,7 @@ bool in_group_or_capable(struct mnt_idmap *idmap,
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL(in_group_or_capable);
|
||||
|
||||
/**
|
||||
* mode_strip_sgid - handle the sgid bit for non-directories
|
||||
|
@ -1942,6 +1942,8 @@ void inode_init_owner(struct mnt_idmap *idmap, struct inode *inode,
|
||||
extern bool may_open_dev(const struct path *path);
|
||||
umode_t mode_strip_sgid(struct mnt_idmap *idmap,
|
||||
const struct inode *dir, umode_t mode);
|
||||
bool in_group_or_capable(struct mnt_idmap *idmap,
|
||||
const struct inode *inode, vfsgid_t vfsgid);
|
||||
|
||||
/*
|
||||
* This is the "filldir" function type, used by readdir() to let
|
||||
|
Loading…
Reference in New Issue
Block a user