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
35 lines
690 B
C
35 lines
690 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_commit(sh);
|
|
test_begin_transaction(sh);
|
|
}
|
|
else if (argc >= 3 && strcmp(argv[2], "twice") == 0) {
|
|
test_begin_transaction(sh);
|
|
test_begin_transaction(sh);
|
|
test_commit(sh);
|
|
}
|
|
else {
|
|
test_begin_transaction(sh);
|
|
test_commit(sh);
|
|
}
|
|
|
|
destroy_handle(sh, argv[1]);
|
|
|
|
exit(0);
|
|
}
|