diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-02-10 15:19:23 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2012-09-21 06:13:18 -0400 |
commit | a726ecce75896b2045f1646a2d7e31a5562b25a0 (patch) | |
tree | 730d5a8aee96f69ba39be6d346fd4dea5fced0a7 | |
parent | 85a03d1bba3b9132adc1aa8f4b8b9e11bac429ec (diff) |
userns: Convert the sysv filesystem to use kuid/kgid where appropriate
Cc: Christoph Hellwig <hch@infradead.org>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-rw-r--r-- | fs/sysv/inode.c | 8 | ||||
-rw-r--r-- | init/Kconfig | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c index 80e1e2b18df1..b23ab736685d 100644 --- a/fs/sysv/inode.c +++ b/fs/sysv/inode.c | |||
@@ -202,8 +202,8 @@ struct inode *sysv_iget(struct super_block *sb, unsigned int ino) | |||
202 | } | 202 | } |
203 | /* SystemV FS: kludge permissions if ino==SYSV_ROOT_INO ?? */ | 203 | /* SystemV FS: kludge permissions if ino==SYSV_ROOT_INO ?? */ |
204 | inode->i_mode = fs16_to_cpu(sbi, raw_inode->i_mode); | 204 | inode->i_mode = fs16_to_cpu(sbi, raw_inode->i_mode); |
205 | inode->i_uid = (uid_t)fs16_to_cpu(sbi, raw_inode->i_uid); | 205 | i_uid_write(inode, (uid_t)fs16_to_cpu(sbi, raw_inode->i_uid)); |
206 | inode->i_gid = (gid_t)fs16_to_cpu(sbi, raw_inode->i_gid); | 206 | i_gid_write(inode, (gid_t)fs16_to_cpu(sbi, raw_inode->i_gid)); |
207 | set_nlink(inode, fs16_to_cpu(sbi, raw_inode->i_nlink)); | 207 | set_nlink(inode, fs16_to_cpu(sbi, raw_inode->i_nlink)); |
208 | inode->i_size = fs32_to_cpu(sbi, raw_inode->i_size); | 208 | inode->i_size = fs32_to_cpu(sbi, raw_inode->i_size); |
209 | inode->i_atime.tv_sec = fs32_to_cpu(sbi, raw_inode->i_atime); | 209 | inode->i_atime.tv_sec = fs32_to_cpu(sbi, raw_inode->i_atime); |
@@ -256,8 +256,8 @@ static int __sysv_write_inode(struct inode *inode, int wait) | |||
256 | } | 256 | } |
257 | 257 | ||
258 | raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode); | 258 | raw_inode->i_mode = cpu_to_fs16(sbi, inode->i_mode); |
259 | raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(inode->i_uid)); | 259 | raw_inode->i_uid = cpu_to_fs16(sbi, fs_high2lowuid(i_uid_read(inode))); |
260 | raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(inode->i_gid)); | 260 | raw_inode->i_gid = cpu_to_fs16(sbi, fs_high2lowgid(i_gid_read(inode))); |
261 | raw_inode->i_nlink = cpu_to_fs16(sbi, inode->i_nlink); | 261 | raw_inode->i_nlink = cpu_to_fs16(sbi, inode->i_nlink); |
262 | raw_inode->i_size = cpu_to_fs32(sbi, inode->i_size); | 262 | raw_inode->i_size = cpu_to_fs32(sbi, inode->i_size); |
263 | raw_inode->i_atime = cpu_to_fs32(sbi, inode->i_atime.tv_sec); | 263 | raw_inode->i_atime = cpu_to_fs32(sbi, inode->i_atime.tv_sec); |
diff --git a/init/Kconfig b/init/Kconfig index 1ff9f4156575..3427832fb4af 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -952,7 +952,6 @@ config UIDGID_CONVERTED | |||
952 | depends on OCFS2_FS = n | 952 | depends on OCFS2_FS = n |
953 | depends on REISERFS_FS = n | 953 | depends on REISERFS_FS = n |
954 | depends on SQUASHFS = n | 954 | depends on SQUASHFS = n |
955 | depends on SYSV_FS = n | ||
956 | depends on UBIFS_FS = n | 955 | depends on UBIFS_FS = n |
957 | depends on UDF_FS = n | 956 | depends on UDF_FS = n |
958 | depends on UFS_FS = n | 957 | depends on UFS_FS = n |