RUNNER_CHILD_TEST_SMACK(tc04_security_server_get_gid)
{
SecurityServer::AccessProvider provider("tc04mylabel");
- provider.allowFunction("security_server_get_gid");
+ provider.allowSS();
provider.applyAndSwithToUser(APP_UID, APP_GID);
int ret = security_server_get_gid("abc123xyz_pysiaczek");
const char *access_rights_ext = "rw";
const char *subject_label = "tc05subjectlabel";
- SmackAccess access;
- access.add(subject_label, object_label, access_rights);
- access.add(subject_label, "security-server::api-cookie-check", "w");
- access.apply();
-
- RUNNER_ASSERT_BT(0 == smack_set_label_for_self(subject_label));
+ SecurityServer::AccessProvider provider(subject_label);
+ provider.allowSS();
+ provider.addObjectRule(object_label, access_rights);
+ provider.applyAndSwithToUser(APP_UID, APP_GID);
RUNNER_ASSERT_BT(SECURITY_SERVER_API_SUCCESS ==
security_server_request_cookie(cookie,20));
- RUNNER_ASSERT_MSG_BT(drop_root_privileges() == 0, "uid = " << getuid());
-
RUNNER_ASSERT_BT(SECURITY_SERVER_API_SUCCESS ==
security_server_check_privilege_by_cookie(
cookie,