]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/env-file-label.c
util-lib: split out env file parsing code into env-file.c
[thirdparty/systemd.git] / src / shared / env-file-label.c
CommitLineData
686d13b9
LP
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
9int 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}