diff options
author | Eric W. Biederman <ebiederm@aristanetworks.com> | 2011-08-11 23:27:53 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@aristanetworks.com> | 2011-08-11 23:27:53 -0500 |
commit | 39ced86b75071d86fbf3da04c3acad075526ff20 (patch) | |
tree | 6ea52afa88876fd0906c54d4586d5a58c5d56432 | |
parent | dc2db4f10e37591ca66ee13f567fe76e72fdf720 (diff) | |
download | linux-user-ns-devel-39ced86b75071d86fbf3da04c3acad075526ff20.tar.gz |
ext4: Don't create inodes for users we can't represent on disk.
-rw-r--r-- | fs/ext4/ialloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 9c63f273b55049..56e976b302e047 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -825,6 +825,9 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode, return ERR_PTR(-EPERM); sb = dir->i_sb; + if (sb->s_user_ns != current_user_ns()) + return ERR_PTR(-EPERM); + ngroups = ext4_get_groups_count(sb); trace_ext4_request_inode(dir, mode); inode = new_inode(sb); |