Generic solution for onlycap issues
[platform/core/test/security-tests.git] / src / common / tests_common.cpp
index b5dff60..235b062 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2013 - 2019 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
  *    you may not use this file except in compliance with the License.
@@ -65,12 +65,6 @@ int drop_root_privileges(uid_t appUid, gid_t appGid)
     return 1;
 }
 
-void setLabelForSelf(const int line, const char *label)
-{
-    int ret = smack_set_label_for_self(label);
-    RUNNER_ASSERT_MSG(ret == 0, "Error in smack_set_label_for_self(): " << ret << ", line: " << line);
-}
-
 /*
  * Add a new group to the current process groups.
  */
@@ -240,12 +234,6 @@ void waitPid(pid_t pid)
         "Child process exited abnormally" <<
         ": ret=" << ret << ", errno=" << errno << ", status=" << status);
 }
-// changes process label
-void change_label(const char* label)
-{
-    int ret = smack_set_label_for_self(label);
-    RUNNER_ASSERT_MSG(0 == ret, "Error in smack_set_label_for_self("<<label<<"). Error: " << ret);
-}
 
 pid_t runInChild(const std::function<void(void)> &process) {
     pid_t pid = fork();