@@ -75,7 +75,7 @@ module_param(uid, int, 0644);
75
75
* Another reason for this is that we can not get sys_open.
76
76
* It is a static variable, so it is not exported.
77
77
*/
78
- static asmlinkage int (* original_call )(const char * , int , int );
78
+ static asmlinkage int (* original_call )(const char __user * , int , umode_t );
79
79
80
80
/* The function we will replace sys_open (the function called when you
81
81
* call the open system call) with. To find the exact prototype, with
@@ -87,7 +87,8 @@ static asmlinkage int (*original_call)(const char *, int, int);
87
87
* wreck havoc and require programs to be recompiled, since the system
88
88
* calls are the interface between the kernel and the processes).
89
89
*/
90
- static asmlinkage int our_sys_open (const char * filename , int flags , int mode )
90
+ static asmlinkage int our_sys_open (const char __user * filename , int flags ,
91
+ umode_t mode )
91
92
{
92
93
int i = 0 ;
93
94
char ch ;
@@ -107,7 +108,7 @@ static asmlinkage int our_sys_open(const char *filename, int flags, int mode)
107
108
return original_call (filename , flags , mode );
108
109
}
109
110
110
- static unsigned long * * aquire_sys_call_table (void )
111
+ static unsigned long * * acquire_sys_call_table (void )
111
112
{
112
113
#ifdef HAVE_KSYS_CLOSE
113
114
unsigned long int offset = PAGE_OFFSET ;
@@ -185,7 +186,7 @@ static void disable_write_protection(void)
185
186
186
187
static int __init syscall_start (void )
187
188
{
188
- if (!(sys_call_table = aquire_sys_call_table ()))
189
+ if (!(sys_call_table = acquire_sys_call_table ()))
189
190
return -1 ;
190
191
191
192
disable_write_protection ();
0 commit comments