49fa036b9d
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/libsemanage#83ed0d4737094f7f23111cd1b02c44bc44a25b8b
34 lines
606 B
C
34 lines
606 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include <semanage/semanage.h>
|
|
|
|
#include "functions.c"
|
|
|
|
int main (int argc, char **argv) {
|
|
semanage_handle_t *sh;
|
|
|
|
if (argc < 2)
|
|
exit(1);
|
|
|
|
sh = get_handle(argv[1]);
|
|
|
|
if (argc >= 3 && strcmp(argv[2], "reversed") == 0) {
|
|
test_disconnect(sh);
|
|
test_connect(sh);
|
|
}
|
|
else {
|
|
test_connect(sh);
|
|
test_disconnect(sh);
|
|
}
|
|
|
|
if (argc >= 3 && strcmp(argv[2], "twice") == 0) {
|
|
test_disconnect(sh);
|
|
}
|
|
|
|
destroy_handle(sh, argv[1]);
|
|
|
|
exit(0);
|
|
}
|