int main(int argc, char *argv[]) {
        int r;
        bool run_ambient;

        log_parse_environment();
        log_open();

        if (getuid() != 0)
                return EXIT_TEST_SKIP;

        r = setup_tests(&run_ambient);
        if (r < 0)
                return -r;

        show_capabilities();

        test_drop_privileges();
        test_update_inherited_set();

        fork_test(test_have_effective_cap);

        if (run_ambient)
                fork_test(test_set_ambient_caps);

        return 0;
}
Beispiel #2
0
int main()
{
    int result;
    printf("before fork_test\n");
    fork_test(); 
    f2();
    printf("after fork_test\n");

    return 0;
}
Beispiel #3
0
int main(int argc, char *argv[]) {
        int r;

        log_parse_environment();
        log_open();

        if (getuid() != 0)
                return EXIT_TEST_SKIP;

        r = setup_tests();
        if (r < 0)
                return -r;

        show_capabilities();

        test_drop_privileges();
        fork_test(test_have_effective_cap);

        return 0;
}
Beispiel #4
0
int main(int argc, char **argv)
{
        (void) printf("Congrats!  You're running this executable.\n");
        (void) printf("Now let's see how you handle the tests...\n");


        mmap_test();

        null_test();
        zero_test();
        brk_test();

        fault_test();

        wait_test();
        cow_fork();

        fork_test();

        return 0;
}
Beispiel #5
0
static void test_drop_privileges(void) {
        fork_test(test_drop_privileges_keep_net_raw);
        fork_test(test_drop_privileges_dontkeep_net_raw);
        fork_test(test_drop_privileges_fail);
}
Beispiel #6
0
int main(void)
{
	fork_test();
	wait_test();
	return 0;
}