1 | /**************************************************************** |
---|
2 | * acm_null_hooks.c |
---|
3 | * |
---|
4 | * Copyright (C) 2005 IBM Corporation |
---|
5 | * |
---|
6 | * Author: |
---|
7 | * Reiner Sailer <sailer@watson.ibm.com> |
---|
8 | * |
---|
9 | * This program is free software; you can redistribute it and/or |
---|
10 | * modify it under the terms of the GNU General Public License as |
---|
11 | * published by the Free Software Foundation, version 2 of the |
---|
12 | * License. |
---|
13 | */ |
---|
14 | |
---|
15 | #include <acm/acm_hooks.h> |
---|
16 | |
---|
17 | static int |
---|
18 | null_init_domain_ssid(void **ssid, ssidref_t ssidref) |
---|
19 | { |
---|
20 | return ACM_OK; |
---|
21 | } |
---|
22 | |
---|
23 | static void |
---|
24 | null_free_domain_ssid(void *ssid) |
---|
25 | { |
---|
26 | return; |
---|
27 | } |
---|
28 | |
---|
29 | static int |
---|
30 | null_dump_binary_policy(u8 *buf, u32 buf_size) |
---|
31 | { |
---|
32 | return 0; |
---|
33 | } |
---|
34 | |
---|
35 | static int |
---|
36 | null_test_binary_policy(u8 *buf, u32 buf_size, int is_bootpolicy, |
---|
37 | struct acm_sized_buffer *errors) |
---|
38 | { |
---|
39 | return ACM_OK; |
---|
40 | } |
---|
41 | |
---|
42 | static int |
---|
43 | null_set_binary_policy(u8 *buf, u32 buf_size) |
---|
44 | { |
---|
45 | return ACM_OK; |
---|
46 | } |
---|
47 | |
---|
48 | static int |
---|
49 | null_dump_stats(u8 *buf, u16 buf_size) |
---|
50 | { |
---|
51 | /* no stats for NULL policy */ |
---|
52 | return 0; |
---|
53 | } |
---|
54 | |
---|
55 | static int |
---|
56 | null_dump_ssid_types(ssidref_t ssidref, u8 *buffer, u16 buf_size) |
---|
57 | { |
---|
58 | /* no types */ |
---|
59 | return 0; |
---|
60 | } |
---|
61 | |
---|
62 | |
---|
63 | /* now define the hook structure similarly to LSM */ |
---|
64 | struct acm_operations acm_null_ops = { |
---|
65 | .init_domain_ssid = null_init_domain_ssid, |
---|
66 | .free_domain_ssid = null_free_domain_ssid, |
---|
67 | .dump_binary_policy = null_dump_binary_policy, |
---|
68 | .test_binary_policy = null_test_binary_policy, |
---|
69 | .set_binary_policy = null_set_binary_policy, |
---|
70 | .dump_statistics = null_dump_stats, |
---|
71 | .dump_ssid_types = null_dump_ssid_types, |
---|
72 | /* domain management control hooks */ |
---|
73 | .domain_create = NULL, |
---|
74 | .domain_destroy = NULL, |
---|
75 | /* event channel control hooks */ |
---|
76 | .pre_eventchannel_unbound = NULL, |
---|
77 | .fail_eventchannel_unbound = NULL, |
---|
78 | .pre_eventchannel_interdomain = NULL, |
---|
79 | .fail_eventchannel_interdomain = NULL, |
---|
80 | /* grant table control hooks */ |
---|
81 | .pre_grant_map_ref = NULL, |
---|
82 | .fail_grant_map_ref = NULL, |
---|
83 | .pre_grant_setup = NULL, |
---|
84 | .fail_grant_setup = NULL |
---|
85 | }; |
---|
86 | |
---|
87 | /* |
---|
88 | * Local variables: |
---|
89 | * mode: C |
---|
90 | * c-set-style: "BSD" |
---|
91 | * c-basic-offset: 4 |
---|
92 | * tab-width: 4 |
---|
93 | * indent-tabs-mode: nil |
---|
94 | * End: |
---|
95 | */ |
---|