Skip to content

Commit f97f193

Browse files
author
Corey Henderson
committed
support for EL8 kernels
1 parent e68ba85 commit f97f193

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

scripts/run_tests.sh

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ MODULE=$1
88
# a set of simple, not-well-thought-out tests I occasionally run to make
99
# sure everything still works, or at least appears to work :P
1010

11+
setfattr --help &> /dev/null
12+
if [ $? -ne 0 ]; then
13+
echo "The setfattr command is not installed. Please install the 'attr' package to run tests."
14+
exit 1
15+
fi
16+
1117
if [ -z "$UID" ] || [ $UID != 0 ]; then
1218

1319
echo "Tests must be ran as the root user."

tpe_module.c

+8
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ fopskit_hook_handler(security_ptrace_access_check) {
128128

129129
/* sys_newuname */
130130

131+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
132+
fopskit_hook_handler(__x64_sys_newuname) {
133+
#else
131134
fopskit_hook_handler(sys_newuname) {
135+
#endif
132136
if (tpe_hide_uname && !UID_IS_TRUSTED(get_task_uid(current)))
133137
TPE_EXTRAS_NOEXEC("uname");
134138
}
@@ -173,7 +177,11 @@ static struct fops_hook tpe_hooks_extras[] = {
173177
fops_hook_val(pid_revalidate),
174178
fops_hook_val(m_show),
175179
fops_hook_val(kallsyms_open),
180+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
181+
fops_hook_val(__x64_sys_newuname),
182+
#else
176183
fops_hook_val(sys_newuname),
184+
#endif
177185
fops_hook_val(proc_sys_read),
178186
};
179187

0 commit comments

Comments
 (0)