Skip to contentSkip to conversation

SELinux programming question

DISCUSSION Stephen D. Smalley 1 participant 1 message Apr 3, 2003 SELinux security module

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines

it is possible to change the sid of a program without to call an exec*_secure?

The SID of a process may also change on a regular execve due to an automatic domain transition in the policy configuration. But the SID of a process cannot change without going through an execve/execve_secure; this is an intentional design choice, and has been discussed in the documentation and on the list previously. setSID-style calls are considered harmful, as you cannot provide the same control over the initialization of the process in the new SID and the inheritance of state between the SIDs, so you end up with very little real separation between the two SIDs.

As a side note, the entire SELinux API is undergoing massive changes as part of preparing SELinux for submission to mainline 2.5, and is likely to undergo even further changes after it is submitted in response to kernel developer feedback before the API can truly be considered stable. There will still be a functional equivalent to execve_secure, but it will look rather different. Details to follow soon.

--
Stephen Smalley, NSA

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.