]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/lsm/nop.c
Merge pull request #3235 from xinhua9569/master
[mirror_lxc.git] / src / lxc / lsm / nop.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2
3 #ifndef _GNU_SOURCE
4 #define _GNU_SOURCE 1
5 #endif
6 #include <stdlib.h>
7
8 #include "config.h"
9 #include "lsm/lsm.h"
10
11 static char *nop_process_label_get(pid_t pid)
12 {
13 return NULL;
14 }
15
16 static int nop_process_label_set(const char *label, struct lxc_conf *conf,
17 bool on_exec)
18 {
19 return 0;
20 }
21
22 static int nop_enabled(void)
23 {
24 return 0;
25 }
26
27 static struct lsm_drv nop_drv = {
28 .name = "nop",
29 .enabled = nop_enabled,
30 .process_label_get = nop_process_label_get,
31 .process_label_set = nop_process_label_set,
32 };
33
34 struct lsm_drv *lsm_nop_drv_init(void)
35 {
36 return &nop_drv;
37 }