chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cgroup: compare fs paths with path_equal() rather than streq()
[elogind.git]
/
src
/
core
/
main.c
diff --git
a/src/core/main.c
b/src/core/main.c
index 91cbee2e5907c47e580e8d71bba43048dc705f32..72bd542af01a9a0978f1f6d99328f87425a96624 100644
(file)
--- a/
src/core/main.c
+++ b/
src/core/main.c
@@
-401,9
+401,14
@@
static int parse_proc_cmdline_word(const char *word) {
} else if (streq(word, "quiet"))
arg_show_status = false;
} else if (streq(word, "quiet"))
arg_show_status = false;
- else if (streq(word, "debug"))
+ else if (streq(word, "debug")) {
+ /* Log to kmsg, the journal socket will fill up before the
+ * journal is started and tools running during that time
+ * will block with every log message for for 60 seconds,
+ * before they give up. */
log_set_max_level(LOG_DEBUG);
log_set_max_level(LOG_DEBUG);
- else if (!in_initrd()) {
+ log_set_target(LOG_TARGET_KMSG);
+ } else if (!in_initrd()) {
unsigned i;
/* SysV compatibility */
unsigned i;
/* SysV compatibility */
@@
-1504,14
+1509,14
@@
int main(int argc, char *argv[]) {
log_error("Failed to adjust timer slack: %m");
if (arg_capability_bounding_set_drop) {
log_error("Failed to adjust timer slack: %m");
if (arg_capability_bounding_set_drop) {
- r = capability_bounding_set_drop
(arg_capability_bounding_set_drop, true
);
+ r = capability_bounding_set_drop
_usermode(arg_capability_bounding_set_drop
);
if (r < 0) {
if (r < 0) {
- log_error("Failed to drop capability bounding set: %s", strerror(-r));
+ log_error("Failed to drop capability bounding set
of usermode helpers
: %s", strerror(-r));
goto finish;
}
goto finish;
}
- r = capability_bounding_set_drop
_usermode(arg_capability_bounding_set_drop
);
+ r = capability_bounding_set_drop
(arg_capability_bounding_set_drop, true
);
if (r < 0) {
if (r < 0) {
- log_error("Failed to drop capability bounding set
of usermode helpers
: %s", strerror(-r));
+ log_error("Failed to drop capability bounding set: %s", strerror(-r));
goto finish;
}
}
goto finish;
}
}
@@
-1776,6
+1781,10
@@
finish:
args[i++] = sfd;
args[i++] = NULL;
args[i++] = sfd;
args[i++] = NULL;
+ /* do not pass along the environment we inherit from the kernel or initrd */
+ if (switch_root_dir)
+ clearenv();
+
assert(i <= args_size);
execv(args[0], (char* const*) args);
}
assert(i <= args_size);
execv(args[0], (char* const*) args);
}