From 9f1c19405a1ccaf59dcc8c32c13a1619541189ad Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 21 Jul 2014 20:41:19 -0400 Subject: 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 --- src/shared/fileio-label.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/shared/fileio-label.c') 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; -- cgit v1.2.3-54-g00ecf