diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-05-03 08:30:35 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-03 08:30:35 -0400 |
commit | edc4ff7c08e9885c40e60c4fb39fa42cc91a0602 (patch) | |
tree | f375d28043dd4457428a841167dc93d760ba9a46 /kernel/uid16.c | |
parent | cbb9a56177b16294ed347ba7fcb1c66c8adb5dc4 (diff) | |
parent | e17df688f7064dae1417ce425dd1e4b71d24d63b (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'kernel/uid16.c')
-rw-r--r-- | kernel/uid16.c | 59 |
1 files changed, 46 insertions, 13 deletions
diff --git a/kernel/uid16.c b/kernel/uid16.c index aa25605027c8..187e2a423878 100644 --- a/kernel/uid16.c +++ b/kernel/uid16.c | |||
@@ -20,43 +20,67 @@ | |||
20 | 20 | ||
21 | asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gid_t group) | 21 | asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gid_t group) |
22 | { | 22 | { |
23 | return sys_chown(filename, low2highuid(user), low2highgid(group)); | 23 | long ret = sys_chown(filename, low2highuid(user), low2highgid(group)); |
24 | /* avoid REGPARM breakage on x86: */ | ||
25 | prevent_tail_call(ret); | ||
26 | return ret; | ||
24 | } | 27 | } |
25 | 28 | ||
26 | asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_gid_t group) | 29 | asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_gid_t group) |
27 | { | 30 | { |
28 | return sys_lchown(filename, low2highuid(user), low2highgid(group)); | 31 | long ret = sys_lchown(filename, low2highuid(user), low2highgid(group)); |
32 | /* avoid REGPARM breakage on x86: */ | ||
33 | prevent_tail_call(ret); | ||
34 | return ret; | ||
29 | } | 35 | } |
30 | 36 | ||
31 | asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group) | 37 | asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group) |
32 | { | 38 | { |
33 | return sys_fchown(fd, low2highuid(user), low2highgid(group)); | 39 | long ret = sys_fchown(fd, low2highuid(user), low2highgid(group)); |
40 | /* avoid REGPARM breakage on x86: */ | ||
41 | prevent_tail_call(ret); | ||
42 | return ret; | ||
34 | } | 43 | } |
35 | 44 | ||
36 | asmlinkage long sys_setregid16(old_gid_t rgid, old_gid_t egid) | 45 | asmlinkage long sys_setregid16(old_gid_t rgid, old_gid_t egid) |
37 | { | 46 | { |
38 | return sys_setregid(low2highgid(rgid), low2highgid(egid)); | 47 | long ret = sys_setregid(low2highgid(rgid), low2highgid(egid)); |
48 | /* avoid REGPARM breakage on x86: */ | ||
49 | prevent_tail_call(ret); | ||
50 | return ret; | ||
39 | } | 51 | } |
40 | 52 | ||
41 | asmlinkage long sys_setgid16(old_gid_t gid) | 53 | asmlinkage long sys_setgid16(old_gid_t gid) |
42 | { | 54 | { |
43 | return sys_setgid(low2highgid(gid)); | 55 | long ret = sys_setgid(low2highgid(gid)); |
56 | /* avoid REGPARM breakage on x86: */ | ||
57 | prevent_tail_call(ret); | ||
58 | return ret; | ||
44 | } | 59 | } |
45 | 60 | ||
46 | asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid) | 61 | asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid) |
47 | { | 62 | { |
48 | return sys_setreuid(low2highuid(ruid), low2highuid(euid)); | 63 | long ret = sys_setreuid(low2highuid(ruid), low2highuid(euid)); |
64 | /* avoid REGPARM breakage on x86: */ | ||
65 | prevent_tail_call(ret); | ||
66 | return ret; | ||
49 | } | 67 | } |
50 | 68 | ||
51 | asmlinkage long sys_setuid16(old_uid_t uid) | 69 | asmlinkage long sys_setuid16(old_uid_t uid) |
52 | { | 70 | { |
53 | return sys_setuid(low2highuid(uid)); | 71 | long ret = sys_setuid(low2highuid(uid)); |
72 | /* avoid REGPARM breakage on x86: */ | ||
73 | prevent_tail_call(ret); | ||
74 | return ret; | ||
54 | } | 75 | } |
55 | 76 | ||
56 | asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid) | 77 | asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid) |
57 | { | 78 | { |
58 | return sys_setresuid(low2highuid(ruid), low2highuid(euid), | 79 | long ret = sys_setresuid(low2highuid(ruid), low2highuid(euid), |
59 | low2highuid(suid)); | 80 | low2highuid(suid)); |
81 | /* avoid REGPARM breakage on x86: */ | ||
82 | prevent_tail_call(ret); | ||
83 | return ret; | ||
60 | } | 84 | } |
61 | 85 | ||
62 | asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, old_uid_t __user *suid) | 86 | asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, old_uid_t __user *suid) |
@@ -72,8 +96,11 @@ asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, | |||
72 | 96 | ||
73 | asmlinkage long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid) | 97 | asmlinkage long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid) |
74 | { | 98 | { |
75 | return sys_setresgid(low2highgid(rgid), low2highgid(egid), | 99 | long ret = sys_setresgid(low2highgid(rgid), low2highgid(egid), |
76 | low2highgid(sgid)); | 100 | low2highgid(sgid)); |
101 | /* avoid REGPARM breakage on x86: */ | ||
102 | prevent_tail_call(ret); | ||
103 | return ret; | ||
77 | } | 104 | } |
78 | 105 | ||
79 | asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, old_gid_t __user *sgid) | 106 | asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, old_gid_t __user *sgid) |
@@ -89,12 +116,18 @@ asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, | |||
89 | 116 | ||
90 | asmlinkage long sys_setfsuid16(old_uid_t uid) | 117 | asmlinkage long sys_setfsuid16(old_uid_t uid) |
91 | { | 118 | { |
92 | return sys_setfsuid(low2highuid(uid)); | 119 | long ret = sys_setfsuid(low2highuid(uid)); |
120 | /* avoid REGPARM breakage on x86: */ | ||
121 | prevent_tail_call(ret); | ||
122 | return ret; | ||
93 | } | 123 | } |
94 | 124 | ||
95 | asmlinkage long sys_setfsgid16(old_gid_t gid) | 125 | asmlinkage long sys_setfsgid16(old_gid_t gid) |
96 | { | 126 | { |
97 | return sys_setfsgid(low2highgid(gid)); | 127 | long ret = sys_setfsgid(low2highgid(gid)); |
128 | /* avoid REGPARM breakage on x86: */ | ||
129 | prevent_tail_call(ret); | ||
130 | return ret; | ||
98 | } | 131 | } |
99 | 132 | ||
100 | static int groups16_to_user(old_gid_t __user *grouplist, | 133 | static int groups16_to_user(old_gid_t __user *grouplist, |