Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 91504 Details for
Bug 135745
gcc tries to write gcda files in wrong dir (read-only by sandbox).
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
same fix but for 1.2.20alpha2
sandbox-1.2.20-opennormalfail.patch (text/plain), 1.99 KB, created by
Kevin F. Quinn (RETIRED)
on 2006-07-11 13:17:32 UTC
(
hide
)
Description:
same fix but for 1.2.20alpha2
Filename:
MIME Type:
Creator:
Kevin F. Quinn (RETIRED)
Created:
2006-07-11 13:17:32 UTC
Size:
1.99 KB
patch
obsolete
>--- libsandbox/wrappers.c.orig 2006-07-11 21:42:48.000000000 +0200 >+++ libsandbox/wrappers.c 2006-07-11 21:51:50.000000000 +0200 >@@ -153,6 +153,16 @@ > FILE *_name(const char *pathname, const char *mode) \ > { \ > FILE *result = NULL; \ >+ int my_errno = errno; \ >+ struct stat st; \ >+\ >+ if (mode!=NULL && mode[0]=='r') { \ >+ /* If we're trying to read, fail normally if file does not stat */\ >+ if (-1 == stat(pathname, &st)) { \ >+ return NULL; \ >+ } \ >+ } \ >+ errno = my_errno; \ > \ > if FUNCTION_SANDBOX_SAFE_OPEN_CHAR("fopen", pathname, mode) { \ > check_dlsym(_name); \ >@@ -326,12 +336,20 @@ > va_list ap; \ > int mode = 0; \ > int result = -1; \ >+ int my_errno = errno; \ >+ struct stat st; \ > \ > if (flags & O_CREAT) { \ > va_start(ap, flags); \ > mode = va_arg(ap, int); \ > va_end(ap); \ >+ } else { \ >+ /* If we're not trying to create, fail normally if file does not stat */\ >+ if (-1 == stat(pathname, &st)) { \ >+ return -1; \ >+ } \ > } \ >+ errno = my_errno; \ > \ > if FUNCTION_SANDBOX_SAFE_OPEN_INT("open", pathname, flags) { \ > check_dlsym(_name); \ >@@ -491,6 +509,16 @@ > FILE *_name(const char *pathname, const char *mode) \ > { \ > FILE *result = NULL; \ >+ int my_errno = errno; \ >+ struct stat64 st; \ >+\ >+ if (mode!=NULL && mode[0]=='r') { \ >+ /* If we're trying to read, fail normally if file does not stat */\ >+ if (-1 == stat64(pathname, &st)) { \ >+ return NULL; \ >+ } \ >+ } \ >+ errno = my_errno; \ > \ > if FUNCTION_SANDBOX_SAFE_OPEN_CHAR("fopen64", pathname, mode) { \ > check_dlsym(_name); \ >@@ -511,12 +539,20 @@ > va_list ap; \ > int mode = 0; \ > int result = -1; \ >+ int my_errno = errno; \ >+ struct stat64 st; \ > \ > if (flags & O_CREAT) { \ > va_start(ap, flags); \ > mode = va_arg(ap, int); \ > va_end(ap); \ >+ } else { \ >+ /* If we're not trying to create, fail normally if file does not stat */\ >+ if (-1 == stat64(pathname, &st)) { \ >+ return -1; \ >+ } \ > } \ >+ errno = my_errno; \ > \ > if FUNCTION_SANDBOX_SAFE_OPEN_INT("open64", pathname, flags) { \ > check_dlsym(_name); \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 135745
:
88797
| 91504 |
133144