Skip to content

Commit

Permalink
dinit: selinux: explain selinux_init_load_policy(3) better
Browse files Browse the repository at this point in the history
Signed-off-by: Rahul Sandhu <[email protected]>
  • Loading branch information
WavyEbuilder committed Feb 27, 2025
1 parent 5ce41ae commit d35ab1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dinit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,9 @@ static bool selinux_transition(const char *exe)

int enforce = 0;
// We don't need to worry about the enforcing=0 kernel cmdline option or parsing
// /etc/selinux/config, selinux_init_load_policy(3) will handle all cases for us.
// /etc/selinux/config, selinux_init_load_policy(3) will handle all cases for us
// by parsing the relevant options and loading the policy in the appropriate mode
// specified by the user. More information can be found in selinux(8).
if (selinux_init_load_policy(&enforce) != 0) {
if (enforce > 0) {
// As we bail here, we can't use the log, so use cerr instead.
Expand Down

0 comments on commit d35ab1b

Please sign in to comment.