chiark / gitweb /
2bfffbfa7aec41924d0212ec89dab7814b862f64
[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
11 #include <stdio.h>
12
13 #include "fileio.h"
14
15 /* These functions are split out of fileio.h (and not for examplement just as flags to the functions they wrap) in
16  * order to optimize linking: This way, -lselinux is needed only for the callers of these functions that need selinux,
17  * but not for all */
18
19 int write_string_file_atomic_label_ts(const char *fn, const char *line, struct timespec *ts);
20 static inline int write_string_file_atomic_label(const char *fn, const char *line) {
21         return write_string_file_atomic_label_ts(fn, line, NULL);
22 }
23 #if 0 /// UNNEEDED by elogind
24 int write_env_file_label(const char *fname, char **l);
25 #endif // 0
26 int fopen_temporary_label(const char *target, const char *path, FILE **f, char **temp_path);
27
28 int create_shutdown_run_nologin_or_warn(void);