selinux: correct the return value when loads initial sids
authorXiu Jianfeng <xiujianfeng@huawei.com>
Thu, 29 Jul 2021 03:16:44 +0000 (11:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:22:16 +0000 (13:22 +0200)
commitf4984f60acc79bf4f626f42a152e6148d0fa4601
treecf0ebc10941117b7c7530c8954b82d5031f0800d
parent100f8396d15480435b889e7ac571da3303b6b12e
selinux: correct the return value when loads initial sids

commit 4c156084daa8ee70978e4b150b5eb5fc7b1f15be upstream.

It should not return 0 when SID 0 is assigned to isids.
This patch fixes it.

Cc: stable@vger.kernel.org
Fixes: e3e0b582c321a ("selinux: remove unused initial SIDs and improve handling")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
[PM: remove changelog from description]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/selinux/ss/policydb.c