]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/smack-util.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2013 Intel Corporation
9 Author: Auke Kok <auke-jan.h.kok@intel.com>
13 #include <sys/types.h>
18 #define SMACK_FLOOR_LABEL "_"
19 #define SMACK_STAR_LABEL "*"
21 typedef enum SmackAttr
{
29 _SMACK_ATTR_INVALID
= -1,
32 bool mac_smack_use(void);
34 int mac_smack_fix(const char *path
, LabelFixFlags flags
);
36 const char* smack_attr_to_string(SmackAttr i
) _const_
;
37 SmackAttr
smack_attr_from_string(const char *s
) _pure_
;
38 int mac_smack_read(const char *path
, SmackAttr attr
, char **label
);
39 int mac_smack_read_fd(int fd
, SmackAttr attr
, char **label
);
40 int mac_smack_apply(const char *path
, SmackAttr attr
, const char *label
);
41 int mac_smack_apply_fd(int fd
, SmackAttr attr
, const char *label
);
42 int mac_smack_apply_pid(pid_t pid
, const char *label
);
43 int mac_smack_copy(const char *dest
, const char *src
);