selinux: Streamline type determination in security_compute_sid
authorCanfeng Guo <guocanfeng@uniontech.com>
Wed, 3 Jul 2024 02:56:05 +0000 (10:56 +0800)
committerPaul Moore <paul@paul-moore.com>
Mon, 29 Jul 2024 20:34:00 +0000 (16:34 -0400)
commitda2d41308c4206b966d77dcb77fb838d94244352
treebdb092f395de6c3980949e646aa081fcbdb1aa6d
parent8400291e289ee6b2bf9779ff1c83a291501f017b
selinux: Streamline type determination in security_compute_sid

Simplifies the logic for determining the security context type in
security_compute_sid, enhancing readability and efficiency.

Consolidates default type assignment logic next to type transition
checks, removing redundancy and improving code flow.

Signed-off-by: Canfeng Guo <guocanfeng@uniontech.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/services.c