提交 61293ee2 编写于 作者: E Eric W. Biederman

userns: Convert squashfs to use kuid/kgid where appropriate

Cc: Phillip Lougher <phillip@squashfs.org.uk>
Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
上级 df814654
...@@ -56,16 +56,20 @@ ...@@ -56,16 +56,20 @@
static int squashfs_new_inode(struct super_block *sb, struct inode *inode, static int squashfs_new_inode(struct super_block *sb, struct inode *inode,
struct squashfs_base_inode *sqsh_ino) struct squashfs_base_inode *sqsh_ino)
{ {
uid_t i_uid;
gid_t i_gid;
int err; int err;
err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->uid), &inode->i_uid); err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->uid), &i_uid);
if (err) if (err)
return err; return err;
err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->guid), &inode->i_gid); err = squashfs_get_id(sb, le16_to_cpu(sqsh_ino->guid), &i_gid);
if (err) if (err)
return err; return err;
i_uid_write(inode, i_uid);
i_gid_write(inode, i_gid);
inode->i_ino = le32_to_cpu(sqsh_ino->inode_number); inode->i_ino = le32_to_cpu(sqsh_ino->inode_number);
inode->i_mtime.tv_sec = le32_to_cpu(sqsh_ino->mtime); inode->i_mtime.tv_sec = le32_to_cpu(sqsh_ino->mtime);
inode->i_atime.tv_sec = inode->i_mtime.tv_sec; inode->i_atime.tv_sec = inode->i_mtime.tv_sec;
......
...@@ -939,7 +939,6 @@ config UIDGID_CONVERTED ...@@ -939,7 +939,6 @@ config UIDGID_CONVERTED
depends on NFSD = n depends on NFSD = n
depends on NFS_FS = n depends on NFS_FS = n
depends on OCFS2_FS = n depends on OCFS2_FS = n
depends on SQUASHFS = n
depends on UBIFS_FS = n depends on UBIFS_FS = n
depends on UDF_FS = n depends on UDF_FS = n
depends on UFS_FS = n depends on UFS_FS = n
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册