[LTP] [PATCH v17 2/3] lib: Add PATH_FS_PROTECTED_REGULAR and PATH_FS_PROTECTED_FIFOS
Wei Gao
wegao@suse.com
Tue Oct 27 03:49:00 CET 2026
Add /proc/sys/fs/protected_regular and /proc/sys/fs/protected_fifos path
definitions to tst_path_defs.h for sysctl configuration.
These sysctls control protections against spoofing attacks when opening
regular files and FIFOs in sticky directories, and will be used by tests
verifying this behavior.
Signed-off-by: Wei Gao <wegao@suse.com>
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
v16->v17:
- New patch in v17: split PATH_FS_PROTECTED_* definitions from open16
into a separate commit.
include/tst_path_defs.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/tst_path_defs.h b/include/tst_path_defs.h
index ecee8d426..a0ac978e1 100644
--- a/include/tst_path_defs.h
+++ b/include/tst_path_defs.h
@@ -47,6 +47,8 @@
#define PATH_FS_PIPE_MAX_PAGES "/proc/sys/fs/pipe-max-pages"
#define PATH_FS_MAX_USER_GROUPS "/proc/sys/fs/fanotify/max_user_groups"
#define PATH_FS_MAX_USER_MARKS "/proc/sys/fs/fanotify/max_user_marks"
+#define PATH_FS_PROTECTED_REGULAR "/proc/sys/fs/protected_regular"
+#define PATH_FS_PROTECTED_FIFOS "/proc/sys/fs/protected_fifos"
/* VM */
#define PATH_VM_DROP_CACHES "/proc/sys/vm/drop_caches"
--
2.55.0
More information about the ltp
mailing list