Adjusting security-manager tests to run with onlycap
[platform/core/test/security-tests.git] / src / common / temp_test_user.cpp
index 198645c..c754308 100644 (file)
@@ -40,6 +40,26 @@ void TemporaryTestUser::create(void)
     if (m_uid != 0)
         remove();
 
+/*
+    Below line of code is a hack for Gumd commit that removes Smack management capabilities:
+
+    | commit 9b45c1afa49103dcb4101f4b28bf7c145f3294a6
+    |/  Author: Yunmi Ha <yunmi.ha@samsung.com>
+    |   Date:   Tue Jul 5 13:40:16 2016 +0900
+    |
+    |       Remove smack capability
+    |
+    |       with wearable profile, CAP_MAC_ADMIN and CAP_MAC_OVERRIDE capabilities are removed.
+    |       (can't use useradd/del/modify function without offline option.)
+    |       with other profile, only CAP_MAC_OVERRIDE capability is removed.
+    |
+    |       For this, gumd launcher was changed to systemd.
+    |
+    |       Change-Id: Ic95fceed41afc41e37e93606c3abf830536ac7d6
+    |       Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
+*/
+    m_offline = true;
+
     bool ret = m_runner.userCreate(m_userName, m_userType, m_offline, m_uid, m_gid);
     RUNNER_ASSERT_MSG(ret, "Failed to add user");
     RUNNER_ASSERT_MSG(m_uid != 0, "Something strange happened during user creation. uid == 0.");