Revert "FROMLIST: overlayfs: handle XATTR_NOSECURITY flag for ge..."

Revert submission 1881578

Reason for revert: broken build in CI
Reverted Changes:
Id2c6fa6ee:FROMLIST: Add flags option to get xattr method pai...
Ifa966dabd:FROMLIST: overlayfs: inode_owner_or_capable called...
I46e6c74ff:FROMLIST: overlayfs: override_creds=off option byp...
I0b8fe9f1f:FROMLIST: overlayfs: handle XATTR_NOSECURITY flag ...

Change-Id: Ie59bb4f7ad86f64c320a3e6f328a4e6f4fa1d204
Signed-off-by: David Anderson <dvander@google.com>
This commit is contained in:
David Anderson
2021-11-19 18:00:53 +00:00
parent 650b7fa416
commit df1cc768a5
3 changed files with 6 additions and 9 deletions

View File

@@ -386,7 +386,7 @@ out:
}
int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name,
void *value, size_t size, int flags)
void *value, size_t size)
{
ssize_t res;
const struct cred *old_cred;
@@ -394,8 +394,7 @@ int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name,
ovl_i_dentry_upper(inode) ?: ovl_dentry_lower(dentry);
old_cred = ovl_override_creds(dentry->d_sb);
res = __vfs_getxattr(&init_user_ns, realdentry, d_inode(realdentry),
name, value, size, flags);
res = vfs_getxattr(&init_user_ns, realdentry, name, value, size);
revert_creds(old_cred);
return res;
}

View File

@@ -187,9 +187,7 @@ static inline ssize_t ovl_do_getxattr(struct ovl_fs *ofs, struct dentry *dentry,
size_t size)
{
const char *name = ovl_xattr(ofs, ox);
struct inode *ip = d_inode(dentry);
int err = __vfs_getxattr(&init_user_ns, dentry, ip, name, value, size,
XATTR_NOSECURITY);
int err = vfs_getxattr(&init_user_ns, dentry, name, value, size);
int len = (value && err > 0) ? err : 0;
pr_debug("getxattr(%pd2, \"%s\", \"%*pE\", %zu, 0) = %i\n",
@@ -498,7 +496,7 @@ int ovl_permission(struct user_namespace *mnt_userns, struct inode *inode,
int ovl_xattr_set(struct dentry *dentry, struct inode *inode, const char *name,
const void *value, size_t size, int flags);
int ovl_xattr_get(struct dentry *dentry, struct inode *inode, const char *name,
void *value, size_t size, int flags);
void *value, size_t size);
ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size);
struct posix_acl *ovl_get_acl(struct inode *inode, int type, bool rcu);
int ovl_update_time(struct inode *inode, struct timespec64 *ts, int flags);

View File

@@ -1002,7 +1002,7 @@ ovl_posix_acl_xattr_get(const struct xattr_handler *handler,
struct dentry *dentry, struct inode *inode,
const char *name, void *buffer, size_t size, int flags)
{
return ovl_xattr_get(dentry, inode, handler->name, buffer, size, flags);
return ovl_xattr_get(dentry, inode, handler->name, buffer, size);
}
static int __maybe_unused
@@ -1083,7 +1083,7 @@ static int ovl_other_xattr_get(const struct xattr_handler *handler,
const char *name, void *buffer, size_t size,
int flags)
{
return ovl_xattr_get(dentry, inode, name, buffer, size, flags);
return ovl_xattr_get(dentry, inode, name, buffer, size);
}
static int ovl_other_xattr_set(const struct xattr_handler *handler,