Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
steam
systemd
Commits
2f6f1bc3
Commit
2f6f1bc3
authored
Sep 10, 2012
by
Lennart Poettering
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
selinux: close stdin/stdout/stderr before loading selinux policy
Let's make sure libselinux doesn't spew to stderr
parent
7762e02b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
src/core/main.c
src/core/main.c
+3
-3
src/core/selinux-setup.c
src/core/selinux-setup.c
+0
-1
No files found.
src/core/main.c
View file @
2f6f1bc3
...
...
@@ -1266,6 +1266,8 @@ int main(int argc, char *argv[]) {
}
arg_running_as
=
MANAGER_SYSTEM
;
make_null_stdio
();
log_set_target
(
detect_container
(
NULL
)
>
0
?
LOG_TARGET_JOURNAL
:
LOG_TARGET_JOURNAL_OR_KMSG
);
if
(
!
skip_setup
)
{
...
...
@@ -1439,10 +1441,8 @@ int main(int argc, char *argv[]) {
/* Reset the console, but only if this is really init and we
* are freshly booted */
if
(
arg_running_as
==
MANAGER_SYSTEM
&&
arg_action
==
ACTION_RUN
)
{
if
(
arg_running_as
==
MANAGER_SYSTEM
&&
arg_action
==
ACTION_RUN
)
console_setup
(
getpid
()
==
1
&&
!
skip_setup
);
make_null_stdio
();
}
/* Open the logging devices, if possible and necessary */
log_open
();
...
...
src/core/selinux-setup.c
View file @
2f6f1bc3
...
...
@@ -79,7 +79,6 @@ int selinux_setup(bool *loaded_policy) {
/* Now load the policy */
before_load
=
now
(
CLOCK_MONOTONIC
);
r
=
selinux_init_load_policy
(
&
enforce
);
if
(
r
==
0
)
{
char
timespan
[
FORMAT_TIMESPAN_MAX
];
char
*
label
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment