Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martyn Welch
linux
Commits
ca013e94
Commit
ca013e94
authored
16 years ago
by
Heiko Carstens
Browse files
Options
Downloads
Patches
Plain Diff
[CVE-2009-0029] System call wrappers part 17
Signed-off-by:
Heiko Carstens
<
heiko.carstens@de.ibm.com
>
parent
002c8976
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fs/open.c
+7
-9
7 additions, 9 deletions
fs/open.c
kernel/uid16.c
+3
-3
3 additions, 3 deletions
kernel/uid16.c
with
10 additions
and
12 deletions
fs/open.c
+
7
−
9
View file @
ca013e94
...
...
@@ -517,7 +517,7 @@ asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode)
return
res
;
}
asmlinkage
long
sys_
access
(
const
char
__user
*
filename
,
int
mode
)
SYSCALL_DEFINE2
(
access
,
const
char
__user
*
,
filename
,
int
,
mode
)
{
return
sys_faccessat
(
AT_FDCWD
,
filename
,
mode
);
}
...
...
@@ -688,7 +688,7 @@ static int chown_common(struct dentry * dentry, uid_t user, gid_t group)
return
error
;
}
asmlinkage
long
sys_
chown
(
const
char
__user
*
filename
,
uid_t
user
,
gid_t
group
)
SYSCALL_DEFINE3
(
chown
,
const
char
__user
*
,
filename
,
uid_t
,
user
,
gid_t
,
group
)
{
struct
path
path
;
int
error
;
...
...
@@ -732,7 +732,7 @@ asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user,
return
error
;
}
asmlinkage
long
sys_
lchown
(
const
char
__user
*
filename
,
uid_t
user
,
gid_t
group
)
SYSCALL_DEFINE3
(
lchown
,
const
char
__user
*
,
filename
,
uid_t
,
user
,
gid_t
,
group
)
{
struct
path
path
;
int
error
;
...
...
@@ -751,8 +751,7 @@ asmlinkage long sys_lchown(const char __user * filename, uid_t user, gid_t group
return
error
;
}
asmlinkage
long
sys_fchown
(
unsigned
int
fd
,
uid_t
user
,
gid_t
group
)
SYSCALL_DEFINE3
(
fchown
,
unsigned
int
,
fd
,
uid_t
,
user
,
gid_t
,
group
)
{
struct
file
*
file
;
int
error
=
-
EBADF
;
...
...
@@ -1048,7 +1047,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
return
fd
;
}
asmlinkage
long
sys_
open
(
const
char
__user
*
filename
,
int
flags
,
int
mode
)
SYSCALL_DEFINE3
(
open
,
const
char
__user
*
,
filename
,
int
,
flags
,
int
,
mode
)
{
long
ret
;
...
...
@@ -1117,7 +1116,7 @@ EXPORT_SYMBOL(filp_close);
* releasing the fd. This ensures that one clone task can't release
* an fd while another clone is opening it.
*/
asmlinkage
long
sys_
close
(
unsigned
int
fd
)
SYSCALL_DEFINE1
(
close
,
unsigned
int
,
fd
)
{
struct
file
*
filp
;
struct
files_struct
*
files
=
current
->
files
;
...
...
@@ -1150,14 +1149,13 @@ asmlinkage long sys_close(unsigned int fd)
spin_unlock
(
&
files
->
file_lock
);
return
-
EBADF
;
}
EXPORT_SYMBOL
(
sys_close
);
/*
* This routine simulates a hangup on the tty, to arrange that users
* are given clean terminals at login time.
*/
asmlinkage
long
sys_
vhangup
(
void
)
SYSCALL_DEFINE0
(
vhangup
)
{
if
(
capable
(
CAP_SYS_TTY_CONFIG
))
{
tty_vhangup_self
();
...
...
This diff is collapsed.
Click to expand it.
kernel/uid16.c
+
3
−
3
View file @
ca013e94
...
...
@@ -17,7 +17,7 @@
#include
<asm/uaccess.h>
asmlinkage
long
sys_
chown16
(
const
char
__user
*
filename
,
old_uid_t
user
,
old_gid_t
group
)
SYSCALL_DEFINE3
(
chown16
,
const
char
__user
*
,
filename
,
old_uid_t
,
user
,
old_gid_t
,
group
)
{
long
ret
=
sys_chown
(
filename
,
low2highuid
(
user
),
low2highgid
(
group
));
/* avoid REGPARM breakage on x86: */
...
...
@@ -25,7 +25,7 @@ asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gi
return
ret
;
}
asmlinkage
long
sys_
lchown16
(
const
char
__user
*
filename
,
old_uid_t
user
,
old_gid_t
group
)
SYSCALL_DEFINE3
(
lchown16
,
const
char
__user
*
,
filename
,
old_uid_t
,
user
,
old_gid_t
,
group
)
{
long
ret
=
sys_lchown
(
filename
,
low2highuid
(
user
),
low2highgid
(
group
));
/* avoid REGPARM breakage on x86: */
...
...
@@ -33,7 +33,7 @@ asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_g
return
ret
;
}
asmlinkage
long
sys_
fchown16
(
unsigned
int
fd
,
old_uid_t
user
,
old_gid_t
group
)
SYSCALL_DEFINE3
(
fchown16
,
unsigned
int
,
fd
,
old_uid_t
,
user
,
old_gid_t
,
group
)
{
long
ret
=
sys_fchown
(
fd
,
low2highuid
(
user
),
low2highgid
(
group
));
/* avoid REGPARM breakage on x86: */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment