]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: open() with O_CREAT should not create inodes with unknown ids
authorSeth Forshee <seth.forshee@canonical.com>
Thu, 26 Jan 2017 20:33:46 +0000 (14:33 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 1 Feb 2017 05:17:05 +0000 (18:17 +1300)
commitd3eb1b6d38dd6580561f337dc3cf6408c52873bc
tree93c51d5133b18cfdc6660669e15e266133360d2a
parent7a88d31fd194dfb383ca1372e2dbec5060b259ea
vfs: open() with O_CREAT should not create inodes with unknown ids

may_create() rejects creation of inodes with ids which lack a
mapping into s_user_ns. However for O_CREAT may_o_create() is
is used instead. Add a similar check there.

Fixes: 4df49be9c6ee ("vfs: Don't create inodes with a uid or gid unknown to the vfs")
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/namei.c