(fold up) return v2 caps regardless of sb userns
Still thinking whether this is the right thing, but I think
it is. We don't want to do that for get_vfs_caps_from_disk(),
but when the user is just reading the xattr we do.
Signed-off-by: Serge Hallyn <serge@hallyn.com>
diff --git a/security/commoncap.c b/security/commoncap.c
index 3c66d17..8083332 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -387,7 +387,7 @@ int cap_inode_getsecurity(struct inode *inode, const char *name, void **buffer,
return ret;
fs_ns = inode->i_sb->s_user_ns;
- if (ret == sizeof(struct vfs_cap_data) && fs_ns == &init_user_ns) {
+ if (ret == sizeof(struct vfs_cap_data)) {
/* If this is sizeof(vfs_cap_data) then we're ok with the
* on-disk value, so return that. */
if (alloc)