#include <dpl/log/log.h>
#include <tests_common.h>
#include <libprivilege-control_test_common.h>
-#include <tracker.h>
+#include "common/duplicates.h"
#include "common/db.h"
-#include <iostream>
-
#define SMACK_STARTUP_RULES_FILE "/opt/etc/smack-app-early/accesses.d/rules"
#define EARLY_RULE_SUBJECT "livebox.web-provider"
result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[4].c_str(), test5, NULL, 0);
RUNNER_ASSERT_MSG_BT(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
- const char *test6[] = { "-malformed malformed rwxat" };
+ const char *test6[] = { "-malformed malformed rwxat", NULL };
result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[5].c_str(), test6, NULL, 0);
RUNNER_ASSERT_MSG_BT(result == PC_ERR_INVALID_PARAM, "perm_add_api_feature returned: " << result);
result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[9].c_str(), test10, NULL, 0);
RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
- const char *test11[] = { "Sub::sjE,ct ~APP~ a-RwXL", NULL}; // TODO This fails.
+ const char *test11[] = { "Sub::sjE,ct ~APP~ a-RwXL", NULL }; // TODO This fails.
result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[10].c_str(), test11, NULL, 0);
RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
// empty group ids
- const char *test13[] = { "~APP~ b a",NULL };
+ const char *test13[] = { "~APP~ b a", NULL};
result = perm_add_api_feature(APP_TYPE_OSP, BLAHBLAH_FEATURE[12].c_str(), test13,(const gid_t[]) {0,1,2},0);
RUNNER_ASSERT_MSG_BT(result == PC_OPERATION_SUCCESS, "perm_add_api_feature returned: " << result);
result = file_exists(OSP_BLAHBLAH_DAC[12].c_str());
DB_END
TestLibPrivilegeControlDatabase db_test;
- db_test.test_db_after__perm_app_uninstall(TRACE_FROM_HERE, APP_ID);
+ db_test.test_db_after__perm_app_uninstall(APP_ID);
}
/*
std::string nptargetlabel = std::string(APP_NPRUNTIME) + ".npruntime";
char *label = NULL;
+ restore_original_additional_rules();
+
DB_BEGIN
result = perm_app_uninstall(APP_NPRUNTIME);
DB_END
TestLibPrivilegeControlDatabase db_test;
- db_test.test_db_after__perm_app_install(TRACE_FROM_HERE, APP_ID);
- db_test.test_db_after__perm_app_install(TRACE_FROM_HERE, APP_TEST_APP_1);
+ db_test.test_db_after__perm_app_install(APP_ID);
+ db_test.test_db_after__perm_app_install(APP_TEST_APP_1);
DB_BEGIN