Coverage Report

Created: 2019-06-19 13:33

/src/systemd/src/shared/tmpfile-util-label.c
Line
Count
Source (jump to first uncovered line)
1
/* SPDX-License-Identifier: LGPL-2.1+ */
2
3
#include <sys/stat.h>
4
5
#include "selinux-util.h"
6
#include "tmpfile-util-label.h"
7
#include "tmpfile-util.h"
8
9
int fopen_temporary_label(
10
                const char *target,
11
                const char *path,
12
                FILE **f,
13
0
                char **temp_path) {
14
0
15
0
        int r;
16
0
17
0
        r = mac_selinux_create_file_prepare(target, S_IFREG);
18
0
        if (r < 0)
19
0
                return r;
20
0
21
0
        r = fopen_temporary(path, f, temp_path);
22
0
23
0
        mac_selinux_create_file_clear();
24
0
25
0
        return r;
26
0
}