Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
a26eab24
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a26eab24
编写于
1月 14, 2009
作者:
H
Heiko Carstens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CVE-2009-0029] System call wrappers part 15
Signed-off-by:
N
Heiko Carstens
<
heiko.carstens@de.ibm.com
>
上级
3480b257
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
9 deletion
+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
未找到文件。
fs/fcntl.c
浏览文件 @
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 @@ asmlinkage long sys_dup3(unsigned int oldfd, unsigned int newfd, int flags)
...
@@ -113,7 +113,7 @@ asmlinkage long sys_dup3(unsigned int oldfd, unsigned int newfd, int flags)
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 @@ asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
...
@@ -358,7 +358,8 @@ asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
}
}
#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
浏览文件 @
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
浏览文件 @
a26eab24
...
@@ -2718,7 +2718,7 @@ asmlinkage long sys_renameat(int olddfd, const char __user *oldname,
...
@@ -2718,7 +2718,7 @@ asmlinkage long sys_renameat(int olddfd, const char __user *oldname,
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
浏览文件 @
a26eab24
...
@@ -594,7 +594,7 @@ SYSCALL_DEFINE1(chroot, const char __user *, filename)
...
@@ -594,7 +594,7 @@ SYSCALL_DEFINE1(chroot, const char __user *, filename)
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 @@ asmlinkage long sys_fchmodat(int dfd, const char __user *filename,
...
@@ -658,7 +658,7 @@ asmlinkage long sys_fchmodat(int dfd, const char __user *filename,
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
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录