forked from WildKernels/Sultan_KernelSU_SUSFS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsys.c_fix.patch
More file actions
26 lines (23 loc) · 716 Bytes
/
Copy pathsys.c_fix.patch
File metadata and controls
26 lines (23 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/kernel/sys.c 2024-12-14 08:39:57.972646309 -0500
+++ b/kernel/sys.c 2024-12-14 08:39:57.972646309 -0500
@@ -1297,14 +1297,23 @@
return ret;
}
+#ifdef CONFIG_KSU_SUSFS_SPOOF_UNAME
+extern struct static_key_false susfs_is_uname_spoof_buffer_set;
+extern void susfs_spoof_uname(struct new_utsname* tmp);
+#endif
+
SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
{
struct new_utsname tmp;
struct task_struct *t;
bool is_gms = false;
down_read(&uts_sem);
memcpy(&tmp, utsname(), sizeof(tmp));
+#ifdef CONFIG_KSU_SUSFS_SPOOF_UNAME
+ if (static_branch_likely(&susfs_is_uname_spoof_buffer_set))
+ susfs_spoof_uname(&tmp);
+#endif
up_read(&uts_sem);
rcu_read_lock();