cred: Reject inodes with invalid ids in set_create_file_as()
authorSeth Forshee <seth.forshee@canonical.com>
Tue, 30 Aug 2016 04:35:01 +0000 (00:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:49 +0000 (08:27 +0200)
commit4666aa74a3797d23a2344033df41b2aa0cfe5023
treea2fe19be357d9b8caab67933a7e3162814876b2c
parent6a90aa44065afb34ad4f37676b734c0e3eeafe6a
cred: Reject inodes with invalid ids in set_create_file_as()

[ Upstream commit 5f65e5ca286126a60f62c8421b77c2018a482b8a ]

Using INVALID_[UG]ID for the LSM file creation context doesn't
make sense, so return an error if the inode passed to
set_create_file_as() has an invalid id.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/cred.c