Change sensitive names to more proper ones.
authorMarcin Niesluchowski <m.niesluchow@samsung.com>
Thu, 16 Jan 2014 06:54:32 +0000 (07:54 +0100)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Wed, 29 Jan 2014 07:20:46 +0000 (08:20 +0100)
[Issue#]        N/A
[Bug/Feature]   Some names could be registered as trademarks.
[Cause]         N/A
[Solution]      Changing names.
[Verification]  Build. Run tests. Test results should not change.

Change-Id: I167be87d597d05c4785edf814bca6fb3f5aeea4c

tests/libsmack-tests/test_cases.cpp
tests/security-server-tests/security_server_tests_client_smack.cpp

index 15c8336..92c54e6 100644 (file)
@@ -588,11 +588,11 @@ RUNNER_TEST_SMACK(smack02_aplying_rules_into_kernel)
     RUNNER_ASSERT_MSG_BT(result == 1, "Error while checking Smack access");
     result = smack_have_access("reader", "book", "rwx");    //should have no access - wrong rule, should be "r" only
     RUNNER_ASSERT_MSG_BT(result == 0, "Error while checking Smack access");
-    result = smack_have_access("mars", "book", "rwx");      //should fail - rule not exist
+    result = smack_have_access("s02badsubjectlabel", "book", "rwx"); //should fail - rule not exist
     RUNNER_ASSERT_MSG_BT(result == -1, "Error while checking Smack access");
 
     //int smack_revoke_subject(const char *subject);
-    result = smack_revoke_subject("snickers");  //this subject do not exist in kernel rules
+    result = smack_revoke_subject("s02nonexistinglabel"); //this subject do not exist in kernel rules
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in removing not existing subject from kernel");
     result = smack_revoke_subject("spy");       //this subject exist in kernel rules
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in removing existing subject from kernel");
@@ -600,7 +600,8 @@ RUNNER_TEST_SMACK(smack02_aplying_rules_into_kernel)
     result = smack_have_access("spy", "book", "rwx");                   //testing access after revoke_subject() from kernel
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in acces aplied to kernel");  //now spy should have no access
 
-    result = smack_accesses_add(rules, "twix", "book", "rwx");          //for create new rule as a consequence of use accesses_clear() below
+    //for create new rule as a consequence of use accesses_clear() below
+    result = smack_accesses_add(rules, "s02subjectlabel", "book", "rwx");
     RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
 
     //int smack_accesses_clear(struct smack_accesses *handle);
@@ -835,8 +836,8 @@ RUNNER_TEST(smack06_get_set_label)
     int result;
     char *label = NULL;
 
-    const int B_SIZE = 8;
-    char buff[B_SIZE];
+    char buff[SMACK_LABEL_LEN+1];
+    const char* s06testlabel = "s06testlabel";
 
     const char *file_path = "/etc/smack/test_smack_rules";
 
@@ -855,7 +856,7 @@ RUNNER_TEST(smack06_get_set_label)
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file default label");
     free(label);
     //get label using xattr function
-    result = getxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
+    result = getxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, SMACK_LABEL_LEN);
     RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "_", result);
@@ -864,22 +865,22 @@ RUNNER_TEST(smack06_get_set_label)
 
     //int smack_setlabel(const char *path, const char* label,
     //          enum smack_label_type type);
-    result = smack_setlabel(file_path, "fanta", SMACK_LABEL_ACCESS);
+    result = smack_setlabel(file_path, s06testlabel, SMACK_LABEL_ACCESS);
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
 
 
     //get label using smack function
     result = smack_getlabel(file_path, &label, SMACK_LABEL_ACCESS);
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in getting smack ACCESS label from file");
-    //get label, should be default "fanta"
-    result = strcmp(label, "fanta");
+    //get label, should be default s06testlabel
+    result = strcmp(label, s06testlabel);
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
     free(label);
     //get label using xattr function
-    result = getxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
+    result = getxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, SMACK_LABEL_LEN);
     RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
-    result = strncmp(buff, "fanta", result);
+    result = strncmp(buff, s06testlabel, result);
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
 }
 
@@ -902,8 +903,9 @@ RUNNER_TEST(smack07_l_get_set_label)
     int result;
     char *label = NULL;
 
-    const int B_SIZE = 8;
-    char buff[B_SIZE];
+    char buff[SMACK_LABEL_LEN+1];
+    const char* s07testlabel1 = "s07testlabel1";
+    const char* s07testlabel2 = "s07testlabel2";
 
     const char *file_path = "/etc/smack/test_smack_rules_lnk";
 
@@ -924,7 +926,7 @@ RUNNER_TEST(smack07_l_get_set_label)
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file default label");
     free(label);
     //get label using xattr function
-    result = lgetxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
+    result = lgetxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, SMACK_LABEL_LEN);
     RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "_", result);
@@ -933,40 +935,40 @@ RUNNER_TEST(smack07_l_get_set_label)
 
     //int smack_lsetlabel(const char *path, const char* label,
     //          enum smack_label_type type);
-    result = smack_lsetlabel(file_path, "7up", SMACK_LABEL_ACCESS);
+    result = smack_lsetlabel(file_path, s07testlabel1, SMACK_LABEL_ACCESS);
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
     //and set label for file pointed by link
-    result = smack_setlabel(file_path, "mirinda", SMACK_LABEL_ACCESS);
+    result = smack_setlabel(file_path, s07testlabel2, SMACK_LABEL_ACCESS);
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
 
 
     //get label using smack function
     result = smack_lgetlabel(file_path, &label, SMACK_LABEL_ACCESS);
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in getting smack ACCESS label from file");
-    //check label, should be "7up"
-    result = strcmp(label, "7up");
+    //check label, should be s07testlabel1
+    result = strcmp(label, s07testlabel1);
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
     free(label);
     //get label using xattr function
-    result = lgetxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
+    result = lgetxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, SMACK_LABEL_LEN);
     RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
-    result = strncmp(buff, "7up", result);
+    result = strncmp(buff, s07testlabel1, result);
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
 
 
-    //now similar to above, but folowing symbolic link set before to "mirinda"
+    //now similar to above, but folowing symbolic link set before to s07testlabel2
     result = smack_getlabel(file_path, &label, SMACK_LABEL_ACCESS);
     RUNNER_ASSERT_MSG_BT(result == 0, "Error gettin label of file pointed by symbolic link");
-    //now label should be "mirinda" for file instead of "7up" set for link
-    result = strcmp(label, "mirinda");
+    //now label should be s07testlabel2 for file instead of s07testlabel1 set for link
+    result = strcmp(label, s07testlabel2);
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong label of file pointed by symbolic link");
     free(label);
     //get label using xattr function
-    result = getxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
+    result = getxattr(file_path, xattr(SMACK_LABEL_ACCESS), buff, SMACK_LABEL_LEN);
     RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
-    result = strncmp(buff, "mirinda", result);
+    result = strncmp(buff, s07testlabel2, result);
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
 }
 
@@ -984,8 +986,8 @@ RUNNER_TEST(smack08_f_get_set_label)
     int result;
     char *label = NULL;
 
-    const int B_SIZE = 8;
-    char buff[B_SIZE];
+    char buff[SMACK_LABEL_LEN+1];
+    const char* s08testlabel = "s08testlabel";
 
     int fd;
     const char *file_path = "/etc/smack/test_smack_rules";
@@ -1007,7 +1009,7 @@ RUNNER_TEST(smack08_f_get_set_label)
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file default label");
     free(label);
     //get label using xattr function
-    result = fgetxattr(fd, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
+    result = fgetxattr(fd, xattr(SMACK_LABEL_ACCESS), buff, SMACK_LABEL_LEN);
     RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
     result = strncmp(buff, "_", result);
@@ -1016,22 +1018,22 @@ RUNNER_TEST(smack08_f_get_set_label)
 
     //int smack_fsetlabel(int fd, const char* label,
     //          enum smack_label_type type);
-    result = smack_fsetlabel(fd, "sprite", SMACK_LABEL_ACCESS);
+    result = smack_fsetlabel(fd, s08testlabel, SMACK_LABEL_ACCESS);
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in setting ACCESS label for file");
 
 
     //get label using smack function
     result = smack_fgetlabel(fd, &label, SMACK_LABEL_ACCESS);
     RUNNER_ASSERT_MSG_BT(result == 0, "Error in getting smack ACCESS label from file");
-    //check label, should be "sprite"
-    result = strcmp(label, "sprite");
+    //check label, should be s08testlabel
+    result = strcmp(label, s08testlabel);
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
     free(label);
     //get label using xattr function
-    result = fgetxattr(fd, xattr(SMACK_LABEL_ACCESS), buff, B_SIZE);
+    result = fgetxattr(fd, xattr(SMACK_LABEL_ACCESS), buff, SMACK_LABEL_LEN);
     RUNNER_ASSERT_MSG_BT(result > 0, "Error in getting xattr from file");
     //check label, should match the one readed by smack function
-    result = strncmp(buff, "sprite", result);
+    result = strncmp(buff, s08testlabel, result);
     RUNNER_ASSERT_MSG_BT(result == 0, "Wrong file label");
 
 
@@ -1794,11 +1796,11 @@ RUNNER_TEST_NOSMACK(smack02_aplying_rules_into_kernel_nosmack)
     RUNNER_ASSERT_MSG_BT(result == -1, "smack_have_access should return error (SMACK is off)");
     result = smack_have_access("reader", "book", "rwx");
     RUNNER_ASSERT_MSG_BT(result == -1, "smack_have_access should return error (SMACK is off)");
-    result = smack_have_access("mars", "book", "rwx");
+    result = smack_have_access("s02badsubjectlabel", "book", "rwx");
     RUNNER_ASSERT_MSG_BT(result == -1, "smack_have_access should return error (SMACK is off)");
 
     //testing subject revoking - should return error (no accesses applied = no subjects to revoke)
-    result = smack_revoke_subject("snickers");
+    result = smack_revoke_subject("s02nonexistinglabel");
     RUNNER_ASSERT_MSG_BT(result == -1, "smack_revoke_subject error - subject doesn't exist.");
     result = smack_revoke_subject("spy");
     RUNNER_ASSERT_MSG_BT(result == -1, "smack_revoke_subject error - subject doesn't exist.");
@@ -1807,7 +1809,7 @@ RUNNER_TEST_NOSMACK(smack02_aplying_rules_into_kernel_nosmack)
     result = smack_have_access("spy", "book", "rwx");
     RUNNER_ASSERT_MSG_BT(result == -1, "smack_have_access should return error (SMACK is off).");
 
-    result = smack_accesses_add(rules.get(), "twix", "book", "rwx");
+    result = smack_accesses_add(rules.get(), "s02subjectlabel", "book", "rwx");
     RUNNER_ASSERT_MSG_BT(result == 0, "Unable to add smack rules");
 
     //smack_accesses_clear should return error aswell
@@ -1858,8 +1860,7 @@ RUNNER_TEST_NOSMACK(smack04_self_label_nosmack)
     int result;
     int fd;
 
-    const int B_SIZE = 8;
-    char buff[B_SIZE];
+    char buff[SMACK_LABEL_LEN+1];
 
     //smack_new_label_from_self should fail
     result = smack_new_label_from_self(&label);
@@ -1873,14 +1874,14 @@ RUNNER_TEST_NOSMACK(smack04_self_label_nosmack)
     fd = open("/proc/self/attr/current", O_RDONLY, 0644);   //file exists, so it should open
     RUNNER_ASSERT_MSG_BT(fd >= 0, "/proc/self/attr/current failed to open.");
 
-    result = read(fd, buff, B_SIZE);                        //however reading it should return error
+    result = read(fd, buff, SMACK_LABEL_LEN);   //however reading it should return error
     if(result >= 0) {
         close(fd);
         RUNNER_ASSERT_MSG_BT(false, "Reading /proc/self/attr/current should return error.");
     }
 
     //setting label for self should fail
-    result = smack_set_label_for_self("fanta");
+    result = smack_set_label_for_self("s04testlabel");
     if(result != -1) {
         close(fd);
         RUNNER_ASSERT_MSG_BT(false, "set_label_for_self should return error (SMACK is off).");
@@ -1904,7 +1905,7 @@ RUNNER_TEST_NOSMACK(smack04_self_label_nosmack)
         RUNNER_ASSERT_MSG_BT(false, "lseek() error.");
     }
 
-    result = read(fd, buff, B_SIZE);                            //however it should return error
+    result = read(fd, buff, SMACK_LABEL_LEN);   //however it should return error
     if(result >= 0) {
         close(fd);
         RUNNER_ASSERT_MSG_BT(false, "Reading /proc/self/attr/current should return error.");
index 68bedc2..ae6ebf9 100644 (file)
@@ -611,6 +611,8 @@ RUNNER_TEST(tc10_security_server_get_uid_by_cookie)
 
 RUNNER_CHILD_TEST_SMACK(tc11_security_server_get_uid_by_cookie_smack)
 {
+    const char* tc11testlabel = "tc11testlabel";
+
     int cookieSize = security_server_get_cookie_size();
     RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
@@ -619,8 +621,10 @@ RUNNER_CHILD_TEST_SMACK(tc11_security_server_get_uid_by_cookie_smack)
     RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG_BT(smack_revoke_subject("BialyMis") == 0, "Error in smack_revoke_subject");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self(tc11testlabel) == 0,
+            "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(smack_revoke_subject(tc11testlabel) == 0,
+            "Error in smack_revoke_subject");
     //drop privileges
     RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
@@ -632,6 +636,8 @@ RUNNER_CHILD_TEST_SMACK(tc11_security_server_get_uid_by_cookie_smack)
 
 RUNNER_CHILD_TEST_SMACK(tc12_security_server_get_uid_by_cookie_smack)
 {
+    const char* tc12testlabel = "tc12testlabel";
+
     int cookieSize = security_server_get_cookie_size();
     RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
@@ -642,8 +648,10 @@ RUNNER_CHILD_TEST_SMACK(tc12_security_server_get_uid_by_cookie_smack)
     RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self(tc12testlabel) == 0,
+            "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule(tc12testlabel,
+            "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
     //drop privileges
     RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
@@ -677,13 +685,18 @@ RUNNER_CHILD_TEST_NOSMACK(tc12_security_server_get_uid_by_cookie_nosmack)
 
 RUNNER_CHILD_TEST_SMACK(tc13_security_server_get_uid_by_cookie_smack)
 {
+    const char* tc13testlabel = "tc13testlabel";
+
     int cookieSize = security_server_get_cookie_size();
     RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
-    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-get", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self(tc13testlabel) == 0,
+            "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule(tc13testlabel,
+            "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule(tc13testlabel,
+            "security-server::api-cookie-get", "w") == 0, "Error in adding rule");
     //drop privileges
     RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
 
@@ -743,6 +756,8 @@ RUNNER_TEST(tc14_security_server_get_gid_by_cookie)
 
 RUNNER_CHILD_TEST_SMACK(tc15_security_server_get_gid_by_cookie_smack)
 {
+    const char* tc15testlabel = "tc15testlabel";
+
     int cookieSize = security_server_get_cookie_size();
     RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
@@ -751,8 +766,10 @@ RUNNER_CHILD_TEST_SMACK(tc15_security_server_get_gid_by_cookie_smack)
     RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG_BT(smack_revoke_subject("BialyMis") == 0, "Error in smack_revoke_subject");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self(tc15testlabel) == 0,
+            "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(smack_revoke_subject(tc15testlabel) == 0,
+            "Error in smack_revoke_subject");
     //drop privileges
     RUNNER_ASSERT_MSG_BT(setgid(APP_GID) == 0, "Unable to drop privileges");
     RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
@@ -765,6 +782,8 @@ RUNNER_CHILD_TEST_SMACK(tc15_security_server_get_gid_by_cookie_smack)
 
 RUNNER_CHILD_TEST_SMACK(tc16_security_server_get_gid_by_cookie_smack)
 {
+    const char* tc16testlabel = "tc16testlabel";
+
     int cookieSize = security_server_get_cookie_size();
     RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
@@ -775,8 +794,10 @@ RUNNER_CHILD_TEST_SMACK(tc16_security_server_get_gid_by_cookie_smack)
     RUNNER_ASSERT_MSG_BT(retval == SECURITY_SERVER_API_SUCCESS, "Unable to get cookie");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self(tc16testlabel) == 0,
+            "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule(tc16testlabel,
+            "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
     //drop privileges
     RUNNER_ASSERT_MSG_BT(setgid(APP_GID) == 0, "Unable to drop privileges");
     RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");
@@ -812,13 +833,18 @@ RUNNER_CHILD_TEST_NOSMACK(tc16_security_server_get_gid_by_cookie_nosmack)
 
 RUNNER_CHILD_TEST_SMACK(tc17_security_server_get_gid_by_cookie_smack)
 {
+    const char* tc17testlabel = "tc17testlabel";
+
     int cookieSize = security_server_get_cookie_size();
     RUNNER_ASSERT_MSG_BT(cookieSize == 20, "Wrong cookie size");
 
     //preapare SMACK environment
-    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self("BialyMis") == 0, "Unable to set label for self");
-    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
-    RUNNER_ASSERT_MSG_BT(apply_smack_rule("BialyMis", "security-server::api-cookie-get", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(smack_set_label_for_self(tc17testlabel) == 0,
+            "Unable to set label for self");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule(tc17testlabel,
+            "security-server::api-cookie-check", "w") == 0, "Error in adding rule");
+    RUNNER_ASSERT_MSG_BT(apply_smack_rule(tc17testlabel,
+            "security-server::api-cookie-get", "w") == 0, "Error in adding rule");
     //drop privileges
     RUNNER_ASSERT_MSG_BT(setgid(APP_GID) == 0, "Unable to drop privileges");
     RUNNER_ASSERT_MSG_BT(setuid(APP_UID) == 0, "Unable to drop privileges");