1 | #include <iostream> |
2 | |
3 | /* makedb needs selinux dso's. */ |
4 | #ifdef HAVE_SELINUX |
5 | # include <selinux/selinux.h> |
6 | #endif |
7 | |
8 | using namespace std; |
9 | |
10 | /* The purpose of this file is to indicate to the build system which |
11 | shared objects need to be copied into the testroot, such as gcc or |
12 | selinux support libraries. This program is never executed, only |
13 | scanned for dependencies on shared objects, so the code below may |
14 | seem weird - it's written to survive gcc optimization and force |
15 | such dependencies. |
16 | */ |
17 | |
18 | int |
19 | main (int argc, char **argv) |
20 | { |
21 | /* Complexity to keep gcc from optimizing this away. */ |
22 | cout << (argc > 1 ? argv[1] : "null" ); |
23 | #ifdef HAVE_SELINUX |
24 | /* This exists to force libselinux.so to be required. */ |
25 | cout << "selinux " << is_selinux_enabled (); |
26 | #endif |
27 | return 0; |
28 | } |
29 | |