-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patches 2 upstream systemd #32430
base: main
Are you sure you want to change the base?
Patches 2 upstream systemd #32430
Changes from 3 commits
cadc6f9
f46cdcd
606472d
855b22d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -1699,6 +1699,17 @@ static void cmdline_take_random_seed(void) { | |||
"This functionality should not be used outside of testing environments."); | ||||
} | ||||
|
||||
static void set_suid_dumpable(void) { | ||||
const char *sd_path = "/proc/sys/fs/suid_dumpable"; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uh, we already do this? systemd/sysctl.d/50-coredump.conf.in Line 37 in 1b47cfa
|
||||
const char *value = "2"; | ||||
|
||||
/* Write suid_dumpable setting: */ | ||||
int r = write_string_file(sd_path, value, 0); | ||||
|
||||
if (r < 0) | ||||
log_emergency("Failed to write to /proc/sys/fs/suid_dumpable"); | ||||
} | ||||
|
||||
static void initialize_coredump(bool skip_setup) { | ||||
if (getpid_cached() != 1) | ||||
return; | ||||
|
@@ -2032,6 +2043,14 @@ static int invoke_main_loop( | |||
assert(ret_switch_root_init); | ||||
assert(ret_error_message); | ||||
|
||||
log_warning("sd: i=userspace, inactive_exit="USEC_FMT, m->timestamps[MANAGER_TIMESTAMP_USERSPACE].monotonic); | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If anything, these definitely shouldn't be logged at the warning level (debug seems to be appropriate). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and they can all be queried at runtime, and some are already logged later, so doesn't seem worth adding any of these |
||||
log_warning("sd: i=security, inactive_exit="USEC_FMT, m->timestamps[MANAGER_TIMESTAMP_SECURITY_START].monotonic); | ||||
log_warning("sd: i=security, active_enter="USEC_FMT, m->timestamps[MANAGER_TIMESTAMP_SECURITY_FINISH].monotonic); | ||||
log_warning("sd: i=generators, inactive_exit="USEC_FMT, m->timestamps[MANAGER_TIMESTAMP_GENERATORS_START].monotonic); | ||||
log_warning("sd: i=generators, active_enter="USEC_FMT, m->timestamps[MANAGER_TIMESTAMP_GENERATORS_FINISH].monotonic); | ||||
log_warning("sd: i=units_load, inactive_exit="USEC_FMT, m->timestamps[MANAGER_TIMESTAMP_UNITS_LOAD_START].monotonic); | ||||
log_warning("sd: i=units_load, active_enter="USEC_FMT, m->timestamps[MANAGER_TIMESTAMP_UNITS_LOAD_FINISH].monotonic); | ||||
|
||||
for (;;) { | ||||
int objective = manager_loop(m); | ||||
if (objective < 0) { | ||||
|
@@ -3002,6 +3021,8 @@ int main(int argc, char *argv[]) { | |||
kernel_timestamp = DUAL_TIMESTAMP_NULL; | ||||
} | ||||
|
||||
log_warning("sd: status changed: INITIALIZING, t="USEC_FMT, userspace_timestamp.monotonic); | ||||
|
||||
initialize_coredump(skip_setup); | ||||
|
||||
r = fixup_environment(); | ||||
|
@@ -3137,6 +3158,7 @@ int main(int argc, char *argv[]) { | |||
} | ||||
|
||||
/* A core pattern might have been specified via the cmdline. */ | ||||
set_suid_dumpable(); | ||||
initialize_core_pattern(skip_setup); | ||||
|
||||
/* Make /usr/ read-only */ | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shorthands are prime real estate, and sd-analyze has tons of options and will get more. This is not something common enough to warrant taking over one of the 52 available single-letter options, so please just use the long one