Joshua Brindle | 13cd4c8 | 2008-08-19 15:30:36 -0400 | [diff] [blame] | 1 | #include <unistd.h> |
| 2 | #include <stdio.h> |
| 3 | #include <stdlib.h> |
Christian Göttsche | 0c407c3 | 2022-05-05 19:44:01 +0200 | [diff] [blame] | 4 | #include <string.h> |
| 5 | #include <errno.h> |
Joshua Brindle | 13cd4c8 | 2008-08-19 15:30:36 -0400 | [diff] [blame] | 6 | #include <selinux/selinux.h> |
| 7 | |
| 8 | int main(int argc __attribute__ ((unused)), char **argv) |
| 9 | { |
| 10 | int rc; |
| 11 | |
| 12 | rc = security_policyvers(); |
| 13 | if (rc < 0) { |
Christian Göttsche | 0c407c3 | 2022-05-05 19:44:01 +0200 | [diff] [blame] | 14 | fprintf(stderr, "%s: security_policyvers() failed: %s\n", argv[0], strerror(errno)); |
Joshua Brindle | 13cd4c8 | 2008-08-19 15:30:36 -0400 | [diff] [blame] | 15 | exit(2); |
| 16 | } |
| 17 | |
| 18 | printf("%d\n", rc); |
Unto Sten | 5d8f44e | 2019-05-10 20:10:37 +0300 | [diff] [blame] | 19 | exit(EXIT_SUCCESS); |
Joshua Brindle | 13cd4c8 | 2008-08-19 15:30:36 -0400 | [diff] [blame] | 20 | } |