]> git.pld-linux.org Git - packages/glibc.git/blob - glibc-alpha_giduidfix.patch
- started update to 2.3.4 RELEASE (will become release 1 when done)
[packages/glibc.git] / glibc-alpha_giduidfix.patch
1 diff -urN libc.orig/sysdeps/unix/sysv/linux/alpha/setregid.c libc/sysdeps/unix/sysv/linux/alpha/setregid.c
2 --- libc.orig/sysdeps/unix/sysv/linux/alpha/setregid.c  1970-01-01 00:00:00.000000000 +0000
3 +++ libc/sysdeps/unix/sysv/linux/alpha/setregid.c       2004-10-30 12:35:20.000000000 +0000
4 @@ -0,0 +1,53 @@
5 +/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
6 +   This file is part of the GNU C Library.
7 +
8 +   The GNU C Library is free software; you can redistribute it and/or
9 +   modify it under the terms of the GNU Lesser General Public
10 +   License as published by the Free Software Foundation; either
11 +   version 2.1 of the License, or (at your option) any later version.
12 +
13 +   The GNU C Library is distributed in the hope that it will be useful,
14 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 +   Lesser General Public License for more details.
17 +
18 +   You should have received a copy of the GNU Lesser General Public
19 +   License along with the GNU C Library; if not, write to the Free
20 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 +   02111-1307 USA.  */
22 +
23 +#include <errno.h>
24 +#include <unistd.h>
25 +#include <sys/types.h>
26 +
27 +#include <sysdep.h>
28 +#include <sys/syscall.h>
29 +
30 +#include <linux/posix_types.h>
31 +#include "kernel-features.h"
32 +#include <pthread-functions.h>
33 +
34 +
35 +int
36 +__setregid (gid_t rgid, gid_t egid)
37 +{
38 +  int result;
39 +
40 +  result = INLINE_SYSCALL (setregid, 2, (signed int)rgid, (signed int)egid);
41 +
42 +#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
43 +  if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
44 +    {
45 +      struct xid_command cmd;
46 +      cmd.syscall_no = __NR_setregid;
47 +      cmd.id[0] = rgid;
48 +      cmd.id[1] = egid;
49 +      __libc_pthread_functions.ptr__nptl_setxid (&cmd);
50 +    }
51 +#endif
52 +
53 +  return result;
54 +}
55 +#ifndef __setregid
56 +weak_alias (__setregid, setregid)
57 +#endif
58 diff -urN libc.orig/sysdeps/unix/sysv/linux/alpha/setresgid.c libc/sysdeps/unix/sysv/linux/alpha/setresgid.c
59 --- libc.orig/sysdeps/unix/sysv/linux/alpha/setresgid.c 1970-01-01 00:00:00.000000000 +0000
60 +++ libc/sysdeps/unix/sysv/linux/alpha/setresgid.c      2004-10-30 12:35:34.000000000 +0000
61 @@ -0,0 +1,55 @@
62 +/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
63 +   This file is part of the GNU C Library.
64 +
65 +   The GNU C Library is free software; you can redistribute it and/or
66 +   modify it under the terms of the GNU Lesser General Public
67 +   License as published by the Free Software Foundation; either
68 +   version 2.1 of the License, or (at your option) any later version.
69 +
70 +   The GNU C Library is distributed in the hope that it will be useful,
71 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
72 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
73 +   Lesser General Public License for more details.
74 +
75 +   You should have received a copy of the GNU Lesser General Public
76 +   License along with the GNU C Library; if not, write to the Free
77 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
78 +   02111-1307 USA.  */
79 +
80 +#include <errno.h>
81 +#include <unistd.h>
82 +#include <sys/types.h>
83 +
84 +#include <sysdep.h>
85 +#include <sys/syscall.h>
86 +
87 +#include <linux/posix_types.h>
88 +#include "kernel-features.h"
89 +#include <pthread-functions.h>
90 +
91 +
92 +int
93 +__setresgid (gid_t rgid, gid_t egid, gid_t sgid)
94 +{
95 +  int result;
96 +
97 +  result = INLINE_SYSCALL (setresgid, 3, (signed int)rgid, (signed int)egid, (signed int)sgid);
98 +
99 +#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
100 +  if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
101 +    {
102 +      struct xid_command cmd;
103 +      cmd.syscall_no = __NR_setresgid;
104 +      cmd.id[0] = rgid;
105 +      cmd.id[1] = egid;
106 +      cmd.id[2] = sgid;
107 +      __libc_pthread_functions.ptr__nptl_setxid (&cmd);
108 +    }
109 +#endif
110 +
111 +  return result;
112 +}
113 +libc_hidden_def (__setresgid)
114 +#ifndef __setresgid
115 +weak_alias (__setresgid, setresgid)
116 +#endif
117 diff -urN libc.orig/sysdeps/unix/sysv/linux/alpha/setresuid.c libc/sysdeps/unix/sysv/linux/alpha/setresuid.c
118 --- libc.orig/sysdeps/unix/sysv/linux/alpha/setresuid.c 1970-01-01 00:00:00.000000000 +0000
119 +++ libc/sysdeps/unix/sysv/linux/alpha/setresuid.c      2004-10-30 12:35:49.000000000 +0000
120 @@ -0,0 +1,55 @@
121 +/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
122 +   This file is part of the GNU C Library.
123 +
124 +   The GNU C Library is free software; you can redistribute it and/or
125 +   modify it under the terms of the GNU Lesser General Public
126 +   License as published by the Free Software Foundation; either
127 +   version 2.1 of the License, or (at your option) any later version.
128 +
129 +   The GNU C Library is distributed in the hope that it will be useful,
130 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
131 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
132 +   Lesser General Public License for more details.
133 +
134 +   You should have received a copy of the GNU Lesser General Public
135 +   License along with the GNU C Library; if not, write to the Free
136 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
137 +   02111-1307 USA.  */
138 +
139 +#include <errno.h>
140 +#include <unistd.h>
141 +#include <sys/types.h>
142 +
143 +#include <sysdep.h>
144 +#include <sys/syscall.h>
145 +
146 +#include <linux/posix_types.h>
147 +#include "kernel-features.h"
148 +#include <pthread-functions.h>
149 +
150 +
151 +int
152 +__setresuid (uid_t ruid, uid_t euid, uid_t suid)
153 +{
154 +  int result;
155 +
156 +  result = INLINE_SYSCALL (setresuid, 3, (signed int)ruid, (signed int)euid, (signed int)suid);
157 +
158 +#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
159 +  if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
160 +    {
161 +      struct xid_command cmd;
162 +      cmd.syscall_no = __NR_setresuid;
163 +      cmd.id[0] = ruid;
164 +      cmd.id[1] = euid;
165 +      cmd.id[2] = suid;
166 +      __libc_pthread_functions.ptr__nptl_setxid (&cmd);
167 +    }
168 +#endif
169 +
170 +  return result;
171 +}
172 +libc_hidden_def (__setresuid)
173 +#ifndef __setresuid
174 +weak_alias (__setresuid, setresuid)
175 +#endif
176 diff -urN libc.orig/sysdeps/unix/sysv/linux/alpha/setreuid.c libc/sysdeps/unix/sysv/linux/alpha/setreuid.c
177 --- libc.orig/sysdeps/unix/sysv/linux/alpha/setreuid.c  1970-01-01 00:00:00.000000000 +0000
178 +++ libc/sysdeps/unix/sysv/linux/alpha/setreuid.c       2004-10-30 12:36:04.000000000 +0000
179 @@ -0,0 +1,53 @@
180 +/* Copyright (C) 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
181 +   This file is part of the GNU C Library.
182 +
183 +   The GNU C Library is free software; you can redistribute it and/or
184 +   modify it under the terms of the GNU Lesser General Public
185 +   License as published by the Free Software Foundation; either
186 +   version 2.1 of the License, or (at your option) any later version.
187 +
188 +   The GNU C Library is distributed in the hope that it will be useful,
189 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
190 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
191 +   Lesser General Public License for more details.
192 +
193 +   You should have received a copy of the GNU Lesser General Public
194 +   License along with the GNU C Library; if not, write to the Free
195 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
196 +   02111-1307 USA.  */
197 +
198 +#include <errno.h>
199 +#include <unistd.h>
200 +#include <sys/types.h>
201 +
202 +#include <sysdep.h>
203 +#include <sys/syscall.h>
204 +
205 +#include <linux/posix_types.h>
206 +#include "kernel-features.h"
207 +#include <pthread-functions.h>
208 +
209 +
210 +int
211 +__setreuid (uid_t ruid, uid_t euid)
212 +{
213 +  int result;
214 +
215 +  result = INLINE_SYSCALL (setreuid, 2, (signed int)ruid, (signed int)euid);
216 +
217 +#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD
218 +  if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL)
219 +    {
220 +      struct xid_command cmd;
221 +      cmd.syscall_no = __NR_setreuid;
222 +      cmd.id[0] = ruid;
223 +      cmd.id[1] = euid;
224 +      __libc_pthread_functions.ptr__nptl_setxid (&cmd);
225 +    }
226 +#endif
227 +
228 +  return result;
229 +}
230 +#ifndef __setreuid
231 +weak_alias (__setreuid, setreuid)
232 +#endif
This page took 0.053161 seconds and 3 git commands to generate.