mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
2002-08-08 Ulrich Drepper <drepper@redhat.com> * gmon/gmon.c (write_gmon): Use O_NOFOLLOW in open calls if available.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2002-08-08 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* gmon/gmon.c (write_gmon): Use O_NOFOLLOW in open calls if available.
|
||||||
|
|
||||||
2002-08-08 Alexandre Oliva <aoliva@redhat.com>
|
2002-08-08 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
* configure.in: Make the test for broken_alias_attribute stricter.
|
* configure.in: Make the test for broken_alias_attribute stricter.
|
||||||
|
@ -320,18 +320,22 @@ write_gmon (void)
|
|||||||
int fd = -1;
|
int fd = -1;
|
||||||
char *env;
|
char *env;
|
||||||
|
|
||||||
|
#ifndef O_NOFOLLOW
|
||||||
|
# define O_NOFOLLOW 0
|
||||||
|
#endif
|
||||||
|
|
||||||
env = getenv ("GMON_OUT_PREFIX");
|
env = getenv ("GMON_OUT_PREFIX");
|
||||||
if (env != NULL && !__libc_enable_secure)
|
if (env != NULL && !__libc_enable_secure)
|
||||||
{
|
{
|
||||||
size_t len = strlen (env);
|
size_t len = strlen (env);
|
||||||
char buf[len + 20];
|
char buf[len + 20];
|
||||||
sprintf (buf, "%s.%u", env, __getpid ());
|
sprintf (buf, "%s.%u", env, __getpid ());
|
||||||
fd = __open (buf, O_CREAT|O_TRUNC|O_WRONLY, 0666);
|
fd = __open (buf, O_CREAT|O_TRUNC|O_WRONLY|O_NOFOLLOW, 0666);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
fd = __open ("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
|
fd = __open ("gmon.out", O_CREAT|O_TRUNC|O_WRONLY|O_NOFOLLOW, 0666);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
char buf[300];
|
char buf[300];
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2002-08-08 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
|
||||||
|
|
||||||
2002-08-07 Ulrich Drepper <drepper@redhat.com>
|
2002-08-07 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* pthread.c (__linuxthreads_initial_report_events): New variable.
|
* pthread.c (__linuxthreads_initial_report_events): New variable.
|
||||||
|
@ -107,14 +107,6 @@ typedef struct
|
|||||||
__builtin_expect (result, 0) != 0 ? -1 : nr * 8 + 7; \
|
__builtin_expect (result, 0) != 0 ? -1 : nr * 8 + 7; \
|
||||||
})
|
})
|
||||||
|
|
||||||
# define TLS_DO_SET_THREAD_AREA(descr) \
|
|
||||||
INLINE_SYSCALL (set_thread_area, 2, descr, 1); \
|
|
||||||
if (__builtin_expect (__seg, 0) == -1) \
|
|
||||||
/* Nothing else we can do. */ \
|
|
||||||
asm ("hlt"); \
|
|
||||||
__seg; \
|
|
||||||
})
|
|
||||||
|
|
||||||
# ifdef __ASSUME_SET_THREAD_AREA_SYSCALL
|
# ifdef __ASSUME_SET_THREAD_AREA_SYSCALL
|
||||||
# define TLS_SETUP_GS_SEGMENT(descr) \
|
# define TLS_SETUP_GS_SEGMENT(descr) \
|
||||||
INLINE_SYSCALL (set_thread_area, 2, descr, 1)
|
INLINE_SYSCALL (set_thread_area, 2, descr, 1)
|
||||||
|
Reference in New Issue
Block a user