]> git.baikalelectronics.ru Git - kernel.git/commit
pass creds to get_empty_filp(), make sure dentry_open() passes the right creds
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 10 Jul 2018 17:12:05 +0000 (13:12 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 12 Jul 2018 14:04:13 +0000 (10:04 -0400)
commit7f8b27647b0b69f207a4416ed98c2cae34518f13
tree5d2519411b954eb4d97c70fb972d7b8a1fb1c635
parent089425fbeb88169bc42cef24d2976c377f187faa
pass creds to get_empty_filp(), make sure dentry_open() passes the right creds

... and rename get_empty_filp() to alloc_empty_file().

dentry_open() gets creds as argument, but the only thing that sees those is
security_file_open() - file->f_cred still ends up with current_cred().  For
almost all callers it's the same thing, but there are several broken cases.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/file_table.c
fs/internal.h
fs/namei.c
fs/open.c