1f08c3bdfSopenharmony_ciTEST SUITE:
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_ciThe directory prot_hsymlinks contains the tests related to harlinks and
4f08c3bdfSopenharmony_cisymlinks restrictions.
5f08c3bdfSopenharmony_ci
6f08c3bdfSopenharmony_ciTESTS AIM:
7f08c3bdfSopenharmony_ci
8f08c3bdfSopenharmony_ciThe aim of the tests is to check the restrictions
9f08c3bdfSopenharmony_cifor hardlinks and symlinks.
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ciThis security restrictions were added in Linux 3.6 and enabled by default,
12f08c3bdfSopenharmony_cibut it broke some programs. It has been disabled by default in Linux 3.7 and
13f08c3bdfSopenharmony_cito control it, special proc parameters added. Distributions and users
14f08c3bdfSopenharmony_cican enable it by writing "1" to /proc/sys/fs/protected_symlinks,
15f08c3bdfSopenharmony_ci/proc/sys/fs/protected_hardlinks.
16f08c3bdfSopenharmony_ci
17f08c3bdfSopenharmony_ciThis test enables restrictions and checks following preconditions:
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ci1. Users who own sticky world-writable directory can't follow symlinks
20f08c3bdfSopenharmony_ciinside that directory if their don't own ones. All other users can follow.
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_ci2. Hard links restriction applies only to non-privileged users. Only
23f08c3bdfSopenharmony_cinon-privileged user can't create hard links to files if he isn't owner
24f08c3bdfSopenharmony_ciof the file or he doesn't have write access to the file.
25