chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
manager: only issue overmount warning when the check succeeded
[elogind.git]
/
src
/
core
/
main.c
diff --git
a/src/core/main.c
b/src/core/main.c
index a0a6ae1f0ab3e23950def6a5a61ce70322ecbb14..b44e7f9cddb3f3754e420f6fffab303c8b21aa20 100644
(file)
--- a/
src/core/main.c
+++ b/
src/core/main.c
@@
-75,9
+75,7
@@
#include "selinux-setup.h"
#include "ima-setup.h"
#include "smack-setup.h"
#include "selinux-setup.h"
#include "ima-setup.h"
#include "smack-setup.h"
-#ifdef HAVE_KMOD
#include "kmod-setup.h"
#include "kmod-setup.h"
-#endif
static enum {
ACTION_RUN,
static enum {
ACTION_RUN,
@@
-1293,11
+1291,11
@@
int main(int argc, char *argv[]) {
if (!skip_setup) {
mount_setup_early();
dual_timestamp_get(&security_start_timestamp);
if (!skip_setup) {
mount_setup_early();
dual_timestamp_get(&security_start_timestamp);
- if (selinux_setup(&loaded_policy) < 0)
+ if (
mac_
selinux_setup(&loaded_policy) < 0)
goto finish;
if (ima_setup() < 0)
goto finish;
goto finish;
if (ima_setup() < 0)
goto finish;
- if (smack_setup(&loaded_policy) < 0)
+ if (
mac_
smack_setup(&loaded_policy) < 0)
goto finish;
dual_timestamp_get(&security_finish_timestamp);
}
goto finish;
dual_timestamp_get(&security_finish_timestamp);
}
@@
-1389,6
+1387,11
@@
int main(int argc, char *argv[]) {
/* Mount /proc, /sys and friends, so that /proc/cmdline and
* /proc/$PID/fd is available. */
if (getpid() == 1) {
/* Mount /proc, /sys and friends, so that /proc/cmdline and
* /proc/$PID/fd is available. */
if (getpid() == 1) {
+
+ /* Load the kernel modules early, so that we kdbus.ko is loaded before kdbusfs shall be mounted */
+ if (!skip_setup)
+ kmod_setup();
+
r = mount_setup(loaded_policy);
if (r < 0)
goto finish;
r = mount_setup(loaded_policy);
if (r < 0)
goto finish;
@@
-1402,9
+1405,11
@@
int main(int argc, char *argv[]) {
if (parse_config_file() < 0)
goto finish;
if (parse_config_file() < 0)
goto finish;
- if (arg_running_as == SYSTEMD_SYSTEM)
- if (parse_proc_cmdline(parse_proc_cmdline_item) < 0)
- goto finish;
+ if (arg_running_as == SYSTEMD_SYSTEM) {
+ r = parse_proc_cmdline(parse_proc_cmdline_item);
+ if (r < 0)
+ log_warning("Failed to parse kernel command line, ignoring: %s", strerror(-r));
+ }
/* Note that this also parses bits from the kernel command
* line, including "debug". */
/* Note that this also parses bits from the kernel command
* line, including "debug". */
@@
-1551,9
+1556,6
@@
int main(int argc, char *argv[]) {
if (arg_show_status > 0 || plymouth_running())
status_welcome();
if (arg_show_status > 0 || plymouth_running())
status_welcome();
-#ifdef HAVE_KMOD
- kmod_setup();
-#endif
hostname_setup();
machine_id_setup(NULL);
loopback_setup();
hostname_setup();
machine_id_setup(NULL);
loopback_setup();
@@
-1797,10
+1799,7
@@
int main(int argc, char *argv[]) {
finish:
pager_close();
finish:
pager_close();
- if (m) {
- manager_free(m);
- m = NULL;
- }
+ m = manager_free(m);
for (j = 0; j < ELEMENTSOF(arg_default_rlimit); j++) {
free(arg_default_rlimit[j]);
for (j = 0; j < ELEMENTSOF(arg_default_rlimit); j++) {
free(arg_default_rlimit[j]);