scripts/selinux/mdp: fix initial SID handling
authorStephen Smalley <stephen.smalley.work@gmail.com>
Wed, 17 Jun 2020 19:22:16 +0000 (15:22 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:32 +0000 (08:23 +0200)
commit04528c6227bb1496af876a242e9d4d747564680e
tree7a1c180106bf04ff8178a8525aade325318b6fe9
parentd850fdbff6f468db14a34c335cc95feb4bfb4be1
scripts/selinux/mdp: fix initial SID handling

[ Upstream commit 382c2b5d23b4245f1818f69286db334355488dc4 ]

commit e3e0b582c321 ("selinux: remove unused initial SIDs and improve
handling") broke scripts/selinux/mdp since the unused initial SID names
were removed and the corresponding generation of policy initial SID
definitions by mdp was not updated accordingly.  Fix it.  With latest
upstream checkpolicy it is no longer necessary to include the SID context
definitions for the unused initial SIDs but retain them for compatibility
with older checkpolicy.

Fixes: e3e0b582c321 ("selinux: remove unused initial SIDs and improve handling")
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/selinux/mdp/mdp.c