summaryrefslogtreecommitdiff
path: root/src/basic/smack-util.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-07-06 19:19:25 -0400
committerDaniel Mack <daniel@zonque.org>2015-07-06 19:19:25 -0400
commit4c1fc3e404d648c70bd2f50ac50aeac6ece8872e (patch)
tree977a223a8f5aa7fc2a5861a8d557b879bfc98a9f /src/basic/smack-util.c
parent40beecdb6d1c73e5acb62ebac2ccbfd7891f2418 (diff)
fileio: consolidate write_string_file*()
Merge write_string_file(), write_string_file_no_create() and write_string_file_atomic() into write_string_file() and provide a flags mask that allows combinations of atomic writing, newline appending and automatic file creation. Change all users accordingly.
Diffstat (limited to 'src/basic/smack-util.c')
-rw-r--r--src/basic/smack-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/smack-util.c b/src/basic/smack-util.c
index 2e24b1ea99..0c3697b61b 100644
--- a/src/basic/smack-util.c
+++ b/src/basic/smack-util.c
@@ -139,7 +139,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);
+ r = write_string_file(p, label, WRITE_STRING_FILE_CREATE);
if (r < 0)
return r;
#endif