chiark / gitweb /
nologin: extend the /run/nologin descriptions a bit (#8244)
[elogind.git] / src / basic / fileio-label.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5   This file is part of systemd.
6
7   Copyright 2010 Lennart Poettering
8   Copyright 2010 Harald Hoyer
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 ***/
23
24 #include <stdio.h>
25
26 #include "fileio.h"
27
28 /* These functions are split out of fileio.h (and not for examplement just as flags to the functions they wrap) in
29  * order to optimize linking: This way, -lselinux is needed only for the callers of these functions that need selinux,
30  * but not for all */
31
32 int write_string_file_atomic_label_ts(const char *fn, const char *line, struct timespec *ts);
33 static inline int write_string_file_atomic_label(const char *fn, const char *line) {
34         return write_string_file_atomic_label_ts(fn, line, NULL);
35 }
36 #if 0 /// UNNEEDED by elogind
37 int write_env_file_label(const char *fname, char **l);
38 #endif // 0
39 int fopen_temporary_label(const char *target, const char *path, FILE **f, char **temp_path);
40
41 int create_shutdown_run_nologin_or_warn(void);