]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
8bb3626d ZJS |
2 | /*** |
3 | This file is part of systemd. | |
4 | ||
5 | Copyright 2015 Zbigniew Jędrzejewski-Szmek | |
6 | ||
7 | systemd is free software; you can redistribute it and/or modify it | |
8 | under the terms of the GNU Lesser General Public License as published by | |
9 | the Free Software Foundation; either version 2.1 of the License, or | |
10 | (at your option) any later version. | |
11 | ||
12 | systemd is distributed in the hope that it will be useful, but | |
13 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 | Lesser General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU Lesser General Public License | |
18 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
19 | ***/ | |
20 | ||
21 | #include <stdio.h> | |
22 | #include <linux/audit.h> | |
23 | ||
24 | #include "audit-type.h" | |
25 | ||
26 | static void print_audit_label(int i) { | |
27 | const char *name; | |
28 | ||
29 | name = audit_type_name_alloca(i); | |
30 | /* This is a separate function only because of alloca */ | |
31 | printf("%i → %s → %s\n", i, audit_type_to_string(i), name); | |
32 | } | |
33 | ||
34 | static void test_audit_type(void) { | |
35 | int i; | |
36 | ||
37 | for (i = 0; i <= AUDIT_KERNEL; i++) | |
38 | print_audit_label(i); | |
39 | } | |
40 | ||
41 | int main(int argc, char **argv) { | |
42 | test_audit_type(); | |
43 | } |