Displaying 20 results from an estimated 128 matches for "f_dupfd_cloexec".
2020 Apr 14
0
[nbdkit PATCH v2 2/3] server: Sanitize stdin/out before running plugin code
...lush(NULL)' is
+ * supposed to reset the underlying offset of seekable stdin, but
+ * glibc is buggy and requires an explicit fflush(stdin) as
+ * well. https://sourceware.org/bugzilla/show_bug.cgi?id=12799
+ */
+ fflush (stdin);
+ fflush (NULL);
+ if (listen_stdin || run) {
+#ifndef F_DUPFD_CLOEXEC
+#define F_DUPFD_CLOEXEC F_DUPFD
+#endif
+ orig_in = fcntl (STDIN_FILENO, F_DUPFD_CLOEXEC, STDERR_FILENO + 1);
+ orig_out = fcntl (STDOUT_FILENO, F_DUPFD_CLOEXEC, STDERR_FILENO + 1);
+#if F_DUPFD == F_DUPFD_CLOEXEC
+ orig_in = set_cloexec (orig_in);
+ orig_out = set_cloexec (orig_out);...
2020 Apr 04
0
[nbdkit PATCH 2/2] server: Sanitize stdin/out before running plugin code
...e originals
+ * when needed. We are still single-threaded at this point, and
+ * already checked that stdin/out were open, so we don't have to
+ * worry about other threads accidentally grabbing our intended fds,
+ * or races on FD_CLOEXEC.
+ */
+ if (listen_stdin || run) {
+#ifndef F_DUPFD_CLOEXEC
+#define F_DUPFD_CLOEXEC F_DUPFD
+#endif
+ orig_in = fcntl (STDIN_FILENO, F_DUPFD_CLOEXEC, STDERR_FILENO + 1);
+ orig_out = fcntl (STDOUT_FILENO, F_DUPFD_CLOEXEC, STDERR_FILENO + 1);
+#if F_DUPFD == F_DUPFD_CLOEXEC
+ orig_in = set_cloexec (orig_in);
+ orig_out = set_cloexec (orig_out);...
2020 Apr 04
6
[nbdkit PATCH 0/2] stdin/out cleanups
This is what I've been playing with in response to my earlier question
about what to do with 'nbdkit -s sh -'
(https://www.redhat.com/archives/libguestfs/2020-April/msg00032.html)
I'm still open to ideas on a better name, and/or whether adding
<stdbool.h> to our public include files is a good idea (if not,
returning int instead of bool is tolerable).
Eric Blake (2):
2012 Jan 30
1
Libvirt migration issues (0.9.4 and 0.9.9)
Dear all,
we're having two different problems with migrations in libvirt, running as root user on host machines with CentOS release 5.5 (Final), kernel: Linux 2.6.32.24 #3 SMP Fri Oct 29 16:22:02 BST 2010 x86_64 x86_64 x86_64 GNU/Linux
First case:
virsh version
Compiled against library: libvir 0.9.4
Using library: libvir 0.9.4
Using API: QEMU 0.9.4
Running hypervisor: QEMU 1.0.50
2020 Apr 14
6
[nbdkit PATCH v2 0/3] more consistent stdin/out handling
In v2:
- use int instead of bool in the public header
- split the tests from the code
- don't overload test-layers; instead, add new tests
- add a missing fflush exposed by the new tests
- other minor cleanups
Eric Blake (3):
server: Add nbdkit_stdio_safe
server: Sanitize stdin/out before running plugin code
server: More tests of stdin/out handling
docs/nbdkit-plugin.pod |
2020 Apr 09
2
Re: [PATCH nbdkit v2 2/3] iso: Implement this plugin using fileops (read-only).
...or. */
> + fd = dup (iso_fd);
We use system(), but only during .get_ready(). I don't see any places
where we fork a child after the first .open, so not setting FD_CLOEXEC
here won't leak into the next client's connection (if we ever add later
fork()s, we'd have to use fcntl(F_DUPFD_CLOEXEC) instead); but maybe a
comment to that effect wouldn't hurt (since we already audited which fds
need CLOEXEC atomically set, seeing the comment will speed up any re-audit).
You are changing from one fd shared among all clients to one fd per
client, but I don't see that as being a severe...
2010 Dec 14
8
builder-ubuntu febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2011 Jan 14
7
builder-ubuntu febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2011 Feb 15
7
builder-ubuntu febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2011 Jan 14
7
builder-debian febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2011 Feb 15
7
builder-debian febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2010 Dec 14
7
builder-debian febootstrap success 85db2a664c820e01a02ddc3b33b3da26fe05dc5b
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2019 Jul 21
2
Missing hivex.h error when compiling on macOS 10.14 (Mojave)
...wap.h usability... no
checking byteswap.h presence... no
checking for byteswap.h... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... no
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... yes
checking whether conversion from 'int' to 'long double' works... yes
checking whether getdtablesize works... yes
checking whether program_invocation_name is declared... no
checking whether program_invocation_short_name is declared... no
checking whether __argv is declared......
2011 May 13
3
builder-debian febootstrap success 6ab9465001dfaa52edc5992ee71f2e9aecc2085d
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2010 Dec 07
0
builder-debian febootstrap FAILED configure step af9f9305a0a48829392a57d24aee30978b449d1d
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2011 Mar 22
1
builder-debian febootstrap success 6720ad28eddbcd671032c151f7219a35ba615b1b
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2010 Dec 07
0
builder-ubuntu febootstrap success 2dfc659c33c5ceb298e8027e219547416b286661
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2010 Dec 10
0
builder-ubuntu febootstrap success 27a911ca193ad5a56a7afac4f6100b3a3f732680
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2010 Dec 07
0
builder-debian febootstrap success af9f9305a0a48829392a57d24aee30978b449d1d
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...
2010 Dec 10
0
builder-debian febootstrap success 27a911ca193ad5a56a7afac4f6100b3a3f732680
...ing whether dirfd is declared... (cached) yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fcntl is declared without a macro... yes
checking whether openat is declared without a macro... yes
checking whether fdopendir is declared... (cached) yes
checking whether fdopendir works... yes
checking for fchmodat... yes
checking for fstatat... yes
checkin...