summaryrefslogtreecommitdiff
path: root/src/shared/fileio-label.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-21 20:41:19 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-21 20:53:05 -0400
commit9f1c19405a1ccaf59dcc8c32c13a1619541189ad (patch)
tree7ab90a2c1c2ed3283db4ef69ecc847d6304aaf0d /src/shared/fileio-label.c
parentc9e738b91199475c88a2f89da448a026e9186058 (diff)
sysusers: fix selinux context of backup files
Also, fix fopen_temporary_label to set proper context. By chance, all users so far used the same context, so the error didn't matter. Also, check return value from label_init(). https://bugzilla.redhat.com/show_bug.cgi?id=1121806
Diffstat (limited to 'src/shared/fileio-label.c')
-rw-r--r--src/shared/fileio-label.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/fileio-label.c b/src/shared/fileio-label.c
index 417ca5695a..c3def3c568 100644
--- a/src/shared/fileio-label.c
+++ b/src/shared/fileio-label.c
@@ -59,7 +59,7 @@ int fopen_temporary_label(const char *target,
const char *path, FILE **f, char **temp_path) {
int r;
- r = label_context_set("/etc/passwd", S_IFREG);
+ r = label_context_set(target, S_IFREG);
if (r < 0)
return r;