libprivilege-control-tests: rewrite test of app_label_dir(), new test for app_label_s...
authorRafal Krypa <r.krypa@samsung.com>
Tue, 5 Feb 2013 15:35:46 +0000 (16:35 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Tue, 5 Feb 2013 16:23:37 +0000 (17:23 +0100)
[Issue#]       SSDWSSP-70
[Feature]      Tests for new libprivilege-control API.
[Cause]        New API requested by Bumjin.
[Solution]     Two new tests added.
[Verification] Build, install, run libprivilege-control tests.

Change-Id: Ic487fb83ec82e63b9e696b8c9ade60cd9f8089cb

31 files changed:
packaging/security-tests.spec
tests/libprivilege-control-tests/CMakeLists.txt
tests/libprivilege-control-tests/test_cases.cpp
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/.level_2/exec [new file with mode: 0755]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/.level_2/normal [new file with mode: 0644]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/exec [new file with mode: 0755]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/level_2/exec [new file with mode: 0755]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/level_2/normal [new file with mode: 0644]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/normal [new file with mode: 0644]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/cycle [new symlink]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/exec [new file with mode: 0755]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/.level_2/exec [new file with mode: 0755]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/.level_2/normal [new file with mode: 0644]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/cycle [new symlink]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/exec [new file with mode: 0755]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/cycle [new symlink]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/exec [new file with mode: 0755]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/non_app_dir [new symlink]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/non_app_file [new symlink]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/normal [new file with mode: 0644]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/non_app_dir [new symlink]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/non_app_file [new symlink]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/normal [new file with mode: 0644]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/non_app_dir [new symlink]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/non_app_file [new symlink]
tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/normal [new file with mode: 0644]
tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/exec [new file with mode: 0755]
tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/non_app_subdir/exec [new file with mode: 0755]
tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/non_app_subdir/normal [new file with mode: 0644]
tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/normal [new file with mode: 0644]
tests/libprivilege-control-tests/test_privilege_control_DIR/test_set_app_privilege/test_APP [new file with mode: 0644]

index ee4f687..26abcec 100644 (file)
@@ -39,12 +39,13 @@ ln -sf /etc/smack/test_smack_rules %{buildroot}/etc/smack/test_smack_rules_lnk
 rm -rf %{buildroot}
 
 %post
-
+find /etc/smack/test_privilege_control_DIR/ -type f -name exec -exec chmod 0755 {} +
 echo "security-tests postinst done ..."
 
 %postun
 
 %files
+%defattr(-, root, root, -)
 /usr/bin/security-tests.sh
 /usr/bin/security-tests-all.sh
 /usr/bin/libsmack-test
index 58056a4..565037b 100644 (file)
@@ -14,6 +14,7 @@
 
 # @file        CMakeLists.txt
 # @author      Jan Olszak (j.olszak@samsung.com)
+# @author      Rafal Krypa (r.krypa@samsung.com)
 # @version     0.1
 # @brief
 #
@@ -75,21 +76,7 @@ INSTALL(FILES
     WORLD_EXECUTE
   )
 
-# Directories and files needed for tests
-FILE(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR)
-FILE(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR/A)
-FILE(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR/A/B)
-
-FILE(WRITE          ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR/test_file " ")
-FILE(WRITE          ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR/A/test_file " ")
-FILE(WRITE          ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR/A/.test_file " ")
-FILE(WRITE          ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR/A/.test_file " ")
-FILE(WRITE          ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR/A/B/test_file " ")
-
-FILE(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR/test_set_app_privilege)
-FILE(WRITE          ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR/test_set_app_privilege/test_APP " ")
-
 INSTALL(DIRECTORY
-    ${PROJECT_SOURCE_DIR}/test_privilege_control_DIR
+    ${PROJECT_SOURCE_DIR}/tests/libprivilege-control-tests/test_privilege_control_DIR
     DESTINATION /etc/smack/
 )
\ No newline at end of file
index a9a448e..e52010e 100644 (file)
@@ -17,6 +17,7 @@
 /*
  * @file        test_cases.cpp
  * @author      Jan Olszak (j.olszak@samsung.com)
+ * @author      Rafal Krypa (r.krypa@samsung.com)
  * @version     1.0
  * @brief       libprivilege-control test runer
  */
@@ -26,6 +27,7 @@
 #include <stdio.h>
 #include <vector>
 #include <errno.h>
+#include <ftw.h>
 #include <dpl/test/test_runner.h>
 #include <dpl/log/log.h>
 #include <sys/types.h>
 
 
 #define SMACK_RULES_DIR  "/etc/smack/accesses.d/"
-#define TEST_DIR_TREE "/etc/smack/test_privilege_control_DIR"
+#define TEST_APP_DIR "/etc/smack/test_privilege_control_DIR/app_dir"
+#define TEST_NON_APP_DIR "/etc/smack/test_privilege_control_DIR/non_app_dir"
 #define APPID_ADD  "test_APP_ID_add"
 #define APPID_REVOKE  "test_APP_ID_revoke"
 #define APPID_DIR  "test_APP_ID_dir"
+#define APPID_SHARED_DIR  "test_APP_ID_shared_dir"
+#define CANARY_LABEL "tiny_yellow_canary"
 
 #define APP_SET_PRIV  "test_APP"
 #define APP_SET_PRIV_PATH "/etc/smack/test_privilege_control_DIR/test_set_app_privilege/test_APP"
@@ -52,6 +57,8 @@ const char *PRIVS[] = { "WRT", "test_privilege_control_rules", NULL };
 #define APP_USER_NAME "app"
 #define APP_HOME_DIR "/opt/home/app"
 
+// How many open file descriptors should ftw() function use?
+#define FTW_MAX_FDS 16
 
 // Rules from test_privilege_control_rules.smack
 const std::vector< std::vector<std::string> > rulesAdd = {
@@ -68,7 +75,8 @@ const std::vector< std::vector<std::string> > rulesAdd = {
         { "test_subject_4", APPID_ADD, "rw" },
         { "test_subject_5", APPID_ADD, "rx" },
         { "test_subject_6", APPID_ADD, "wx" },
-        { "test_subject_7", APPID_ADD, "rwx" }};
+        { "test_subject_7", APPID_ADD, "rwx" },
+        { APPID_ADD, APPID_SHARED_DIR, "rwxat"}};
 
 
 // Rules from test_privilege_control_rules.smack
@@ -88,15 +96,6 @@ const std::vector< std::vector<std::string> > rulesRevoke = {
         { "test_subject_6", APPID_REVOKE, "wx" },
         { "test_subject_7", APPID_REVOKE, "rwx" }};
 
-// Files added in spec file
-const std::vector<std::string> paths = {
-        "/etc/smack/test_privilege_control_DIR",
-        "/etc/smack/test_privilege_control_DIR/test_file",
-        "/etc/smack/test_privilege_control_DIR/A",
-        "/etc/smack/test_privilege_control_DIR/A/test_file",
-        "/etc/smack/test_privilege_control_DIR/A/.test_file",
-        "/etc/smack/test_privilege_control_DIR/A/B/test_file" };
-
 /**
  * Check if every rule is true.
  * @return 1 if ALL rules in SMACK, 0 if ANY rule isn't
@@ -127,10 +126,162 @@ int test_have_any_accesses(const std::vector< std::vector<std::string> >& rules)
 
 RUNNER_TEST_GROUP_INIT(libprivilegecontrol)
 
+static int nftw_remove_labels(const char *fpath, const struct stat *sb,
+                               int typeflag, struct FTW *ftwbuf)
+{
+       smack_lsetlabel(fpath, NULL, SMACK_LABEL_ACCESS);
+       smack_lsetlabel(fpath, NULL, SMACK_LABEL_EXEC);
+       smack_lsetlabel(fpath, NULL, SMACK_LABEL_TRANSMUTE);
+
+       return 0;
+}
+
+static int nftw_set_labels_non_app_dir(const char *fpath, const struct stat *sb,
+                               int typeflag, struct FTW *ftwbuf)
+{
+       smack_lsetlabel(fpath, CANARY_LABEL, SMACK_LABEL_ACCESS);
+       smack_lsetlabel(fpath, CANARY_LABEL, SMACK_LABEL_EXEC);
+       smack_lsetlabel(fpath, NULL, SMACK_LABEL_TRANSMUTE);
+
+       return 0;
+}
+
+static int nftw_check_labels_non_app_dir(const char *fpath, const struct stat *sb,
+                               int typeflag, struct FTW *ftwbuf)
+{
+    int result;
+    char* label;
+
+    /* ACCESS */
+    result = smack_lgetlabel(fpath, &label, SMACK_LABEL_ACCESS);
+    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    result = strcmp(CANARY_LABEL, label);
+    RUNNER_ASSERT_MSG(result == 0, "ACCESS label on " << fpath << " is overwritten");
+
+    /* EXEC */
+    result = smack_lgetlabel(fpath, &label, SMACK_LABEL_EXEC);
+    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    result = strcmp(CANARY_LABEL, label);
+    RUNNER_ASSERT_MSG(result == 0, "EXEC label on " << fpath << " is overwritten");
+
+    /* TRANSMUTE */
+    result = smack_lgetlabel(fpath, &label, SMACK_LABEL_TRANSMUTE);
+    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG(label == NULL, "TRANSMUTE label on " << fpath << " is set");
+
+    return 0;
+}
+
+static int nftw_check_labels_app_dir(const char *fpath, const struct stat *sb,
+                               int typeflag, struct FTW *ftwbuf)
+{
+    int result;
+    char* label;
+
+    /* ACCESS */
+    result = smack_lgetlabel(fpath, &label, SMACK_LABEL_ACCESS);
+    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG(label != NULL, "ACCESS label on " << fpath << " is not set");
+    result = strcmp(APPID_DIR, label);
+    RUNNER_ASSERT_MSG(result == 0, "ACCESS label on " << fpath << " is incorrect");
+
+    /* EXEC */
+    result = smack_lgetlabel(fpath, &label, SMACK_LABEL_EXEC);
+    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    if (S_ISREG(sb->st_mode) && (sb->st_mode & S_IXUSR)) {
+        RUNNER_ASSERT_MSG(label != NULL, "EXEC label on " << fpath << " is not set");
+        result = strcmp(APPID_DIR, label);
+        RUNNER_ASSERT_MSG(result == 0, "EXEC label on executable file " << fpath << " is incorrect");
+    } else
+        RUNNER_ASSERT_MSG(label == NULL, "EXEC label on " << fpath << " is set");
+
+    /* TRANSMUTE */
+    result = smack_lgetlabel(fpath, &label, SMACK_LABEL_TRANSMUTE);
+    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG(label == NULL, "TRANSMUTE label on " << fpath << " is set");
+
+    return 0;
+}
+
+static int nftw_check_labels_app_shared_dir(const char *fpath, const struct stat *sb,
+                               int typeflag, struct FTW *ftwbuf)
+{
+    int result;
+    char* label;
+
+    /* ACCESS */
+    result = smack_lgetlabel(fpath, &label, SMACK_LABEL_ACCESS);
+    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG(label != NULL, "ACCESS label on " << fpath << " is not set");
+    result = strcmp(APPID_SHARED_DIR, label);
+    RUNNER_ASSERT_MSG(result == 0, "ACCESS label on " << fpath << " is incorrect");
+
+    /* EXEC */
+    result = smack_lgetlabel(fpath, &label, SMACK_LABEL_EXEC);
+    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    RUNNER_ASSERT_MSG(label == NULL, "EXEC label on " << fpath << " is set");
+
+    /* TRANSMUTE */
+    result = smack_lgetlabel(fpath, &label, SMACK_LABEL_TRANSMUTE);
+    RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
+    if (S_ISDIR(sb->st_mode)) {
+        RUNNER_ASSERT_MSG(label != NULL, "TRANSMUTE label on " << fpath << " is not set");
+        result = strcmp("TRUE", label);
+        RUNNER_ASSERT_MSG(result == 0, "TRANSMUTE label on " << fpath << " is not set");
+    } else
+        RUNNER_ASSERT_MSG(label == NULL, "TRANSMUTE label on " << fpath << " is set");
+
+    return 0;
+}
+
+/**
+ * Test setting labels for all files and folders in given path.
+ */
+RUNNER_TEST(privilege_control01_app_label_dir)
+{
+    int result;
+
+    result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
+    RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_APP_DIR);
+
+    result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
+    RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_NON_APP_DIR);
+
+    result = app_label_dir(APPID_DIR, TEST_APP_DIR);
+    RUNNER_ASSERT_MSG(result == 0, "app_label_dir() failed");
+
+    result = nftw(TEST_APP_DIR, &nftw_check_labels_app_dir, FTW_MAX_FDS, FTW_PHYS);
+    RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for app dir");
+
+    result = nftw(TEST_NON_APP_DIR, &nftw_check_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
+    RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for non-app dir");
+}
+
+RUNNER_TEST(privilege_control02_app_label_shared_dir)
+{
+    int result;
+
+    result = nftw(TEST_APP_DIR, &nftw_remove_labels, FTW_MAX_FDS, FTW_PHYS);
+    RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_APP_DIR);
+
+    result = nftw(TEST_NON_APP_DIR, &nftw_set_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
+    RUNNER_ASSERT_MSG(result == 0, "Unable to clean up Smack labels in " << TEST_NON_APP_DIR);
+
+    result = app_label_shared_dir(APPID_ADD, APPID_SHARED_DIR, TEST_APP_DIR);
+    RUNNER_ASSERT_MSG(result == 0, "app_label_shared_dir() failed");
+
+    result = nftw(TEST_APP_DIR, &nftw_check_labels_app_shared_dir, FTW_MAX_FDS, FTW_PHYS);
+    RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for shared app dir");
+
+    result = nftw(TEST_NON_APP_DIR, &nftw_check_labels_non_app_dir, FTW_MAX_FDS, FTW_PHYS);
+    RUNNER_ASSERT_MSG(result == 0, "Unable to check Smack labels for non-app dir");
+}
+
+
 /**
  * Add permisions from  test_privilege_control_rules template
  */
-RUNNER_TEST(privilege_control_add_permissions)
+RUNNER_TEST(privilege_control03_add_permissions)
 {
     char* path;
 
@@ -167,30 +318,11 @@ RUNNER_TEST(privilege_control_add_permissions)
 
 }
 
-/**
- * Test setting labels for all files and folders in given path.
- */
-RUNNER_TEST(privilege_control_dir_add)
-{
-    int result = app_label_dir(APPID_DIR, TEST_DIR_TREE);
-    RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS,
-            "Setting privileges for /etc/smack/test_privilege_control_DIR. Errno: " << result);
-
-    // Check if labels are realy set.
-    for(int i=0; i<paths.size(); ++i){
-        char* label;
-        result = smack_getlabel(paths[i].c_str(), &label, SMACK_LABEL_ACCESS);
-        RUNNER_ASSERT_MSG(result == 0, "Could not get label for the path");
-        result = strcmp(APPID_DIR, label);
-        RUNNER_ASSERT_MSG(result == PC_OPERATION_SUCCESS, "Label NOT set");
-        free(label);
-    }
-}
 
 /**
  * Revoke permissions from the list. Should be executed as privileged user.
  */
-RUNNER_TEST(privilege_control_revoke_permissions)
+RUNNER_TEST(privilege_control04_revoke_permissions)
 {
     int result;
 
@@ -228,7 +360,7 @@ RUNNER_TEST(privilege_control_revoke_permissions)
 /**
  * Set APP privileges.
  */
-RUNNER_TEST(privilege_control_set_app_privilege)
+RUNNER_TEST(privilege_control05_set_app_privilege)
 {
     int result;
     char* labelApp = "test_pc_label";
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/.level_2/exec b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/.level_2/exec
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/.level_2/normal b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/.level_2/normal
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/exec b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/exec
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/level_2/exec b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/level_2/exec
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/level_2/normal b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/level_2/normal
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/normal b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/.level_1/normal
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/cycle b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/cycle
new file mode 120000 (symlink)
index 0000000..945c9b4
--- /dev/null
@@ -0,0 +1 @@
+.
\ No newline at end of file
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/exec b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/exec
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/.level_2/exec b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/.level_2/exec
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/.level_2/normal b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/.level_2/normal
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/cycle b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/cycle
new file mode 120000 (symlink)
index 0000000..b870225
--- /dev/null
@@ -0,0 +1 @@
+../
\ No newline at end of file
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/exec b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/exec
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/cycle b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/cycle
new file mode 120000 (symlink)
index 0000000..6581736
--- /dev/null
@@ -0,0 +1 @@
+../../
\ No newline at end of file
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/exec b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/exec
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/non_app_dir b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/non_app_dir
new file mode 120000 (symlink)
index 0000000..187d002
--- /dev/null
@@ -0,0 +1 @@
+../../../non_app_dir/
\ No newline at end of file
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/non_app_file b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/non_app_file
new file mode 120000 (symlink)
index 0000000..b63f27f
--- /dev/null
@@ -0,0 +1 @@
+../../../non_app_dir/normal
\ No newline at end of file
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/normal b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/level_2/normal
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/non_app_dir b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/non_app_dir
new file mode 120000 (symlink)
index 0000000..80559f6
--- /dev/null
@@ -0,0 +1 @@
+../../non_app_dir/
\ No newline at end of file
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/non_app_file b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/non_app_file
new file mode 120000 (symlink)
index 0000000..1fdebec
--- /dev/null
@@ -0,0 +1 @@
+../../non_app_dir/normal
\ No newline at end of file
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/normal b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/level_1/normal
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/non_app_dir b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/non_app_dir
new file mode 120000 (symlink)
index 0000000..a870a2a
--- /dev/null
@@ -0,0 +1 @@
+../non_app_dir/
\ No newline at end of file
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/non_app_file b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/non_app_file
new file mode 120000 (symlink)
index 0000000..f7f5e53
--- /dev/null
@@ -0,0 +1 @@
+../non_app_dir/normal
\ No newline at end of file
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/normal b/tests/libprivilege-control-tests/test_privilege_control_DIR/app_dir/normal
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/exec b/tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/exec
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/non_app_subdir/exec b/tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/non_app_subdir/exec
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/non_app_subdir/normal b/tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/non_app_subdir/normal
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/normal b/tests/libprivilege-control-tests/test_privilege_control_DIR/non_app_dir/normal
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/libprivilege-control-tests/test_privilege_control_DIR/test_set_app_privilege/test_APP b/tests/libprivilege-control-tests/test_privilege_control_DIR/test_set_app_privilege/test_APP
new file mode 100644 (file)
index 0000000..e69de29