]>
Commit | Line | Data |
---|---|---|
fe4de9a6 DE |
1 | /* |
2 | * lxc: linux Container library | |
3 | * | |
4 | * Copyright © 2013 Oracle. | |
5 | * | |
6 | * Authors: | |
7 | * Dwight Engen <dwight.engen@oracle.com> | |
8 | * | |
9 | * This library is free software; you can redistribute it and/or | |
10 | * modify it under the terms of the GNU Lesser General Public | |
11 | * License as published by the Free Software Foundation; either | |
12 | * version 2.1 of the License, or (at your option) any later version. | |
13 | * | |
14 | * This library is distributed in the hope that it will be useful, | |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 | * Lesser General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU Lesser General Public | |
20 | * License along with this library; if not, write to the Free Software | |
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
22 | */ | |
23 | ||
24 | #include <stdlib.h> | |
25 | #include "lsm/lsm.h" | |
26 | ||
27 | static char *nop_process_label_get(pid_t pid) | |
28 | { | |
29 | return NULL; | |
30 | } | |
31 | ||
7aff4f43 | 32 | static int nop_process_label_set(const char *label, struct lxc_conf *conf, |
e6e89974 | 33 | bool use_default, bool on_exec) |
fe4de9a6 DE |
34 | { |
35 | return 0; | |
36 | } | |
37 | ||
9e4bf8b1 DE |
38 | static int nop_enabled(void) |
39 | { | |
40 | return 0; | |
41 | } | |
42 | ||
fe4de9a6 DE |
43 | static struct lsm_drv nop_drv = { |
44 | .name = "nop", | |
9e4bf8b1 | 45 | .enabled = nop_enabled, |
fe4de9a6 DE |
46 | .process_label_get = nop_process_label_get, |
47 | .process_label_set = nop_process_label_set, | |
48 | }; | |
49 | ||
50 | struct lsm_drv *lsm_nop_drv_init(void) | |
51 | { | |
52 | return &nop_drv; | |
53 | } |