Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 336554 Details for
Bug 453634
sys-libs/uclibc-0.9.33.2: add functions dup3 and mkostemp for building sys-fs/udev-197 and above
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
temporary workaround patch
udev197-mkostemp-dup3.patch (text/plain), 5.30 KB, created by
Tibor Vago
on 2013-01-23 08:28:58 UTC
(
hide
)
Description:
temporary workaround patch
Filename:
MIME Type:
Creator:
Tibor Vago
Created:
2013-01-23 08:28:58 UTC
Size:
5.30 KB
patch
obsolete
>diff -urN systemd-197.old/src/core/manager.c systemd-197/src/core/manager.c >--- systemd-197.old/src/core/manager.c 2013-01-21 20:13:31.863308178 +0000 >+++ systemd-197/src/core/manager.c 2013-01-21 20:13:41.746642488 +0000 >@@ -1822,7 +1822,7 @@ > return -ENOMEM; > > saved_umask = umask(0077); >- fd = mkostemp(path, O_RDWR|O_CLOEXEC); >+ fd = mkstemp(path); > umask(saved_umask); > > if (fd < 0) { >diff -urN systemd-197.old/src/journal/cat.c systemd-197/src/journal/cat.c >--- systemd-197.old/src/journal/cat.c 2013-01-21 20:13:31.866641804 +0000 >+++ systemd-197/src/journal/cat.c 2013-01-21 20:14:16.699977378 +0000 >@@ -143,8 +143,8 @@ > > saved_stderr = fcntl(STDERR_FILENO, F_DUPFD_CLOEXEC, 3); > >- if (dup3(fd, STDOUT_FILENO, 0) < 0 || >- dup3(fd, STDERR_FILENO, 0) < 0) { >+ if (dup2(fd, STDOUT_FILENO) < 0 || >+ dup2(fd, STDERR_FILENO) < 0) { > log_error("Failed to duplicate fd: %m"); > r = -errno; > goto finish; >@@ -164,7 +164,7 @@ > > /* Let's try to restore a working stderr, so we can print the error message */ > if (saved_stderr >= 0) >- dup3(saved_stderr, STDERR_FILENO, 0); >+ dup2(saved_stderr, STDERR_FILENO); > > log_error("Failed to execute process: %s", strerror(-r)); > >diff -urN systemd-197.old/src/journal/coredumpctl.c systemd-197/src/journal/coredumpctl.c >--- systemd-197.old/src/journal/coredumpctl.c 2013-01-21 20:13:31.866641804 +0000 >+++ systemd-197/src/journal/coredumpctl.c 2013-01-21 20:13:41.746642488 +0000 >@@ -472,7 +472,7 @@ > data = (const uint8_t*) data + 9; > len -= 9; > >- fd = mkostemp(path, O_WRONLY); >+ fd = mkstemp(path); > if (fd < 0) { > log_error("Failed to create temporary file: %m"); > return -errno; >diff -urN systemd-197.old/src/journal/journal-send.c systemd-197/src/journal/journal-send.c >--- systemd-197.old/src/journal/journal-send.c 2013-01-21 20:13:31.866641804 +0000 >+++ systemd-197/src/journal/journal-send.c 2013-01-21 20:13:41.749975836 +0000 >@@ -330,7 +330,7 @@ > * file and just pass a file descriptor of it to the other > * side */ > >- buffer_fd = mkostemp(path, O_CLOEXEC|O_RDWR); >+ buffer_fd = mkstemp(path); > if (buffer_fd < 0) { > r = -errno; > goto finish; >diff -urN systemd-197.old/src/journal/journal-verify.c systemd-197/src/journal/journal-verify.c >--- systemd-197.old/src/journal/journal-verify.c 2013-01-21 20:13:31.866641804 +0000 >+++ systemd-197/src/journal/journal-verify.c 2013-01-21 20:13:41.749975836 +0000 >@@ -701,7 +701,7 @@ > } else if (f->seal) > return -ENOKEY; > >- data_fd = mkostemp(data_path, O_CLOEXEC); >+ data_fd = mkstemp(data_path); > if (data_fd < 0) { > log_error("Failed to create data file: %m"); > r = -errno; >@@ -709,7 +709,7 @@ > } > unlink(data_path); > >- entry_fd = mkostemp(entry_path, O_CLOEXEC); >+ entry_fd = mkstemp(entry_path); > if (entry_fd < 0) { > log_error("Failed to create entry file: %m"); > r = -errno; >@@ -717,7 +717,7 @@ > } > unlink(entry_path); > >- entry_array_fd = mkostemp(entry_array_path, O_CLOEXEC); >+ entry_array_fd = mkstemp(entry_array_path); > if (entry_array_fd < 0) { > log_error("Failed to create entry array file: %m"); > r = -errno; >diff -urN systemd-197.old/src/journal/journalctl.c systemd-197/src/journal/journalctl.c >--- systemd-197.old/src/journal/journalctl.c 2013-01-21 20:13:31.866641804 +0000 >+++ systemd-197/src/journal/journalctl.c 2013-01-21 20:13:41.749975836 +0000 >@@ -662,7 +662,7 @@ > n /= arg_interval; > > close_nointr_nofail(fd); >- fd = mkostemp(k, O_WRONLY|O_CLOEXEC|O_NOCTTY); >+ fd = mkstemp(k); > if (fd < 0) { > log_error("Failed to open %s: %m", k); > r = -errno; >diff -urN systemd-197.old/src/shared/ask-password-api.c systemd-197/src/shared/ask-password-api.c >--- systemd-197.old/src/shared/ask-password-api.c 2013-01-21 20:13:31.866641804 +0000 >+++ systemd-197/src/shared/ask-password-api.c 2013-01-21 20:13:41.749975836 +0000 >@@ -326,7 +326,7 @@ > mkdir_p_label("/run/systemd/ask-password", 0755); > > u = umask(0022); >- fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY); >+ fd = mkstemp(temp); > umask(u); > > if (fd < 0) { >diff -urN systemd-197.old/src/shared/util.c systemd-197/src/shared/util.c >--- systemd-197.old/src/shared/util.c 2013-01-21 20:13:31.866641804 +0000 >+++ systemd-197/src/shared/util.c 2013-01-21 20:13:59.089978188 +0000 >@@ -2588,9 +2588,9 @@ > > assert(fd >= 0); > >- r = dup3(fd, STDIN_FILENO, 0); >- s = dup3(fd, STDOUT_FILENO, 0); >- t = dup3(fd, STDERR_FILENO, 0); >+ r = dup2(fd, STDIN_FILENO); >+ s = dup2(fd, STDOUT_FILENO); >+ t = dup2(fd, STDERR_FILENO); > > if (fd >= 3) > close_nointr_nofail(fd); >@@ -4133,7 +4133,7 @@ > t[k] = '.'; > stpcpy(stpcpy(t+k+1, fn), "XXXXXX"); > >- fd = mkostemp(t, O_WRONLY|O_CLOEXEC); >+ fd = mkstemp(t); > if (fd < 0) { > free(t); > return -errno;
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 453634
:
336552
| 336554