diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-06-18 22:02:18 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-06-19 00:00:24 +0200 |
commit | 34c10968cbe3b5591b3c0ce225b8694edd9709d0 (patch) | |
tree | 3f708515fbe0eff8c66f9a140c5be027ac00f664 /src/shared | |
parent | 3bdace9bf779ce051f00c14914b35c3a26164aa9 (diff) |
coredump: optionally store coredumps on disk, not in the journal
Introduce a new configuration file /etc/systemd/coredump.conf to
configure when to place coredumps in the journal and when on disk.
Since the coredumps are quite large, default to storing them only on
disk.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/acl-util.h | 8 | ||||
-rw-r--r-- | src/shared/sleep-config.c | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/shared/acl-util.h b/src/shared/acl-util.h index 36ef490d7e..a753ad14fd 100644 --- a/src/shared/acl-util.h +++ b/src/shared/acl-util.h @@ -26,3 +26,11 @@ int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry); int calc_acl_mask_if_needed(acl_t *acl_p); int search_acl_groups(char*** dst, const char* path, bool* belong); + +static inline void acl_freep(acl_t *acl) { + + if (!*acl) + return; + + acl_free(*acl); +} diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c index cf1cd400e8..1972cdbb38 100644 --- a/src/shared/sleep-config.c +++ b/src/shared/sleep-config.c @@ -31,6 +31,7 @@ #define USE(x, y) do{ (x) = (y); (y) = NULL; } while(0) int parse_sleep_config(const char *verb, char ***_modes, char ***_states) { + _cleanup_strv_free_ char **suspend_mode = NULL, **suspend_state = NULL, **hibernate_mode = NULL, **hibernate_state = NULL, @@ -44,7 +45,8 @@ int parse_sleep_config(const char *verb, char ***_modes, char ***_states) { { "Sleep", "HibernateState", config_parse_strv, 0, &hibernate_state }, { "Sleep", "HybridSleepMode", config_parse_strv, 0, &hybrid_mode }, { "Sleep", "HybridSleepState", config_parse_strv, 0, &hybrid_state }, - {}}; + {} + }; int r; FILE _cleanup_fclose_ *f; |