Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
a26eab24
Commit
a26eab24
authored
Jan 14, 2009
by
Heiko Carstens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[
CVE-2009
-0029] System call wrappers part 15
Signed-off-by:
Heiko Carstens
<
heiko.carstens@de.ibm.com
>
parent
3480b257
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
fs/fcntl.c
fs/fcntl.c
+6
-5
fs/ioctl.c
fs/ioctl.c
+1
-1
fs/namei.c
fs/namei.c
+1
-1
fs/open.c
fs/open.c
+2
-2
No files found.
fs/fcntl.c
View file @
a26eab24
...
@@ -50,7 +50,7 @@ static int get_close_on_exec(unsigned int fd)
...
@@ -50,7 +50,7 @@ static int get_close_on_exec(unsigned int fd)
return
res
;
return
res
;
}
}
asmlinkage
long
sys_dup3
(
unsigned
int
oldfd
,
unsigned
int
newfd
,
int
flags
)
SYSCALL_DEFINE3
(
dup3
,
unsigned
int
,
oldfd
,
unsigned
int
,
newfd
,
int
,
flags
)
{
{
int
err
=
-
EBADF
;
int
err
=
-
EBADF
;
struct
file
*
file
,
*
tofree
;
struct
file
*
file
,
*
tofree
;
...
@@ -113,7 +113,7 @@ out_unlock:
...
@@ -113,7 +113,7 @@ out_unlock:
return
err
;
return
err
;
}
}
asmlinkage
long
sys_dup2
(
unsigned
int
oldfd
,
unsigned
int
newfd
)
SYSCALL_DEFINE2
(
dup2
,
unsigned
int
,
oldfd
,
unsigned
int
,
newfd
)
{
{
if
(
unlikely
(
newfd
==
oldfd
))
{
/* corner case */
if
(
unlikely
(
newfd
==
oldfd
))
{
/* corner case */
struct
files_struct
*
files
=
current
->
files
;
struct
files_struct
*
files
=
current
->
files
;
...
@@ -126,7 +126,7 @@ asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd)
...
@@ -126,7 +126,7 @@ asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd)
return
sys_dup3
(
oldfd
,
newfd
,
0
);
return
sys_dup3
(
oldfd
,
newfd
,
0
);
}
}
asmlinkage
long
sys_dup
(
unsigned
int
fildes
)
SYSCALL_DEFINE1
(
dup
,
unsigned
int
,
fildes
)
{
{
int
ret
=
-
EBADF
;
int
ret
=
-
EBADF
;
struct
file
*
file
=
fget
(
fildes
);
struct
file
*
file
=
fget
(
fildes
);
...
@@ -335,7 +335,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
...
@@ -335,7 +335,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
return
err
;
return
err
;
}
}
asmlinkage
long
sys_fcntl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
SYSCALL_DEFINE3
(
fcntl
,
unsigned
int
,
fd
,
unsigned
int
,
cmd
,
unsigned
long
,
arg
)
{
{
struct
file
*
filp
;
struct
file
*
filp
;
long
err
=
-
EBADF
;
long
err
=
-
EBADF
;
...
@@ -358,7 +358,8 @@ out:
...
@@ -358,7 +358,8 @@ out:
}
}
#if BITS_PER_LONG == 32
#if BITS_PER_LONG == 32
asmlinkage
long
sys_fcntl64
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
SYSCALL_DEFINE3
(
fcntl64
,
unsigned
int
,
fd
,
unsigned
int
,
cmd
,
unsigned
long
,
arg
)
{
{
struct
file
*
filp
;
struct
file
*
filp
;
long
err
;
long
err
;
...
...
fs/ioctl.c
View file @
a26eab24
...
@@ -542,7 +542,7 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
...
@@ -542,7 +542,7 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
return
error
;
return
error
;
}
}
asmlinkage
long
sys_ioctl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
SYSCALL_DEFINE3
(
ioctl
,
unsigned
int
,
fd
,
unsigned
int
,
cmd
,
unsigned
long
,
arg
)
{
{
struct
file
*
filp
;
struct
file
*
filp
;
int
error
=
-
EBADF
;
int
error
=
-
EBADF
;
...
...
fs/namei.c
View file @
a26eab24
...
@@ -2718,7 +2718,7 @@ exit:
...
@@ -2718,7 +2718,7 @@ exit:
return
error
;
return
error
;
}
}
asmlinkage
long
sys_rename
(
const
char
__user
*
oldname
,
const
char
__user
*
newname
)
SYSCALL_DEFINE2
(
rename
,
const
char
__user
*
,
oldname
,
const
char
__user
*
,
newname
)
{
{
return
sys_renameat
(
AT_FDCWD
,
oldname
,
AT_FDCWD
,
newname
);
return
sys_renameat
(
AT_FDCWD
,
oldname
,
AT_FDCWD
,
newname
);
}
}
...
...
fs/open.c
View file @
a26eab24
...
@@ -594,7 +594,7 @@ out:
...
@@ -594,7 +594,7 @@ out:
return
error
;
return
error
;
}
}
asmlinkage
long
sys_fchmod
(
unsigned
int
fd
,
mode_t
mode
)
SYSCALL_DEFINE2
(
fchmod
,
unsigned
int
,
fd
,
mode_t
,
mode
)
{
{
struct
inode
*
inode
;
struct
inode
*
inode
;
struct
dentry
*
dentry
;
struct
dentry
*
dentry
;
...
@@ -658,7 +658,7 @@ out:
...
@@ -658,7 +658,7 @@ out:
return
error
;
return
error
;
}
}
asmlinkage
long
sys_chmod
(
const
char
__user
*
filename
,
mode_t
mode
)
SYSCALL_DEFINE2
(
chmod
,
const
char
__user
*
,
filename
,
mode_t
,
mode
)
{
{
return
sys_fchmodat
(
AT_FDCWD
,
filename
,
mode
);
return
sys_fchmodat
(
AT_FDCWD
,
filename
,
mode
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment