diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-06 21:00:07 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-06 21:24:03 +0900 |
commit | 57512c893eacbafdad5d91df43ac4cd43b328993 (patch) | |
tree | a3f0f67b017d5faadba070201d1fd9224184d771 /src/basic | |
parent | 76cdddfb9d7cf0c7a03201f981ab17fc96c2340d (diff) | |
download | systemd-57512c893eacbafdad5d91df43ac4cd43b328993.tar.gz systemd-57512c893eacbafdad5d91df43ac4cd43b328993.tar.bz2 systemd-57512c893eacbafdad5d91df43ac4cd43b328993.zip |
tree-wide: set WRITE_STRING_FILE_DISABLE_BUFFER flag when we write files under /proc or /sys
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/smack-util.c | 2 | ||||
-rw-r--r-- | src/basic/util.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c index e7ea78f349..123d00e13e 100644 --- a/src/basic/smack-util.c +++ b/src/basic/smack-util.c @@ -115,7 +115,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { return 0; p = procfs_file_alloca(pid, "attr/current"); - r = write_string_file(p, label, 0); + r = write_string_file(p, label, WRITE_STRING_FILE_DISABLE_BUFFER); if (r < 0) return r; diff --git a/src/basic/util.c b/src/basic/util.c index 0da963f4af..b6e874c3b8 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -606,7 +606,7 @@ void disable_coredumps(void) { if (detect_container() > 0) return; - r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", 0); + r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", WRITE_STRING_FILE_DISABLE_BUFFER); if (r < 0) log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); } |