]>
Commit | Line | Data |
---|---|---|
03467c88 | 1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
e51bc1a2 | 2 | |
c2f1db8f | 3 | #pragma once |
e51bc1a2 LP |
4 | |
5 | /*** | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2010 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
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 | |
e51bc1a2 LP |
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 | |
5430f7f2 | 18 | Lesser General Public License for more details. |
e51bc1a2 | 19 | |
5430f7f2 | 20 | You should have received a copy of the GNU Lesser General Public License |
e51bc1a2 LP |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
22 | ***/ | |
23 | ||
24 | #include <sys/types.h> | |
c904f64d | 25 | #include <stdbool.h> |
f13e30d2 | 26 | #include <sys/socket.h> |
45f15021 | 27 | #include <stdio.h> |
e51bc1a2 | 28 | |
0f9963a8 | 29 | int label_init(const char *prefix); |
e51bc1a2 LP |
30 | void label_finish(void); |
31 | ||
c9bc0764 | 32 | int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs); |
e51bc1a2 LP |
33 | |
34 | int label_socket_set(const char *label); | |
35 | void label_socket_clear(void); | |
36 | ||
e9a5ef7c KS |
37 | int label_context_set(const char *path, mode_t mode); |
38 | void label_context_clear(void); | |
e51bc1a2 LP |
39 | |
40 | void label_free(const char *label); | |
41 | ||
189583d7 | 42 | int label_get_create_label_from_exe(const char *exe, char **label); |
16115b0a MS |
43 | int label_get_our_label(char **label); |
44 | int label_get_child_mls_label(int socket_fd, const char *exec, char **label); | |
e51bc1a2 | 45 | |
39bdfa31 | 46 | int label_mkdir(const char *path, mode_t mode); |
e51bc1a2 | 47 | |
f13e30d2 | 48 | int label_bind(int fd, const struct sockaddr *addr, socklen_t addrlen); |
a5c32cff | 49 | |
463b5dbb KS |
50 | int label_apply(const char *path, const char *label); |
51 | ||
a5c32cff HH |
52 | int label_write_one_line_file_atomic(const char *fn, const char *line); |
53 | int label_write_env_file(const char *fname, char **l); | |
54 | int label_fopen_temporary(const char *path, FILE **_f, char **_temp_path); |