]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/env-file-label.c
Merge pull request #11827 from keszybz/pkgconfig-variables
[thirdparty/systemd.git] / src / shared / env-file-label.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2
3 #include <sys/stat.h>
4
5 #include "env-file-label.h"
6 #include "env-file.h"
7 #include "selinux-util.h"
8
9 int write_env_file_label(const char *fname, char **l) {
10 int r;
11
12 r = mac_selinux_create_file_prepare(fname, S_IFREG);
13 if (r < 0)
14 return r;
15
16 r = write_env_file(fname, l);
17
18 mac_selinux_create_file_clear();
19
20 return r;
21 }