diff options
author | Chris Down <chris@chrisdown.name> | 2018-12-12 14:58:46 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-12 20:47:40 +0100 |
commit | e92aaed30e0b5750e5633765f1bddd51c96678e5 (patch) | |
tree | b568cc092a868d3a4226f529e943d3cde8e72f82 /src/shared | |
parent | 9be3c605706cd8430e330e9d16df372f5daccce2 (diff) | |
download | systemd-e92aaed30e0b5750e5633765f1bddd51c96678e5.tar.gz |
tree-wide: Remove O_CLOEXEC from fdopen
fdopen doesn't accept "e", it's ignored. Let's not mislead people into
believing that it actually sets O_CLOEXEC.
From `man 3 fdopen`:
> e (since glibc 2.7):
> Open the file with the O_CLOEXEC flag. See open(2) for more information. This flag is ignored for fdopen()
As mentioned by @jlebon in #11131.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/dissect-image.c | 2 | ||||
-rw-r--r-- | src/shared/exec-util.c | 2 | ||||
-rw-r--r-- | src/shared/install.c | 2 | ||||
-rw-r--r-- | src/shared/os-util.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 4e572ac861..6ea8e4df8d 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -1300,7 +1300,7 @@ int dissected_image_acquire_metadata(DissectedImage *m) { fds[2*k+1] = safe_close(fds[2*k+1]); - f = fdopen(fds[2*k], "re"); + f = fdopen(fds[2*k], "r"); if (!f) { r = -errno; goto finish; diff --git a/src/shared/exec-util.c b/src/shared/exec-util.c index d66b300459..17a278a00f 100644 --- a/src/shared/exec-util.c +++ b/src/shared/exec-util.c @@ -308,7 +308,7 @@ static int gather_environment_consume(int fd, void *arg) { assert(env); - f = fdopen(fd, "re"); + f = fdopen(fd, "r"); if (!f) { safe_close(fd); return -errno; diff --git a/src/shared/install.c b/src/shared/install.c index 822645ef43..51d33b80e9 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1286,7 +1286,7 @@ static int unit_file_load( if (r < 0) return r; - f = fdopen(fd, "re"); + f = fdopen(fd, "r"); if (!f) return -errno; fd = -1; diff --git a/src/shared/os-util.c b/src/shared/os-util.c index f7d46d3c47..b2d5ce32e7 100644 --- a/src/shared/os-util.c +++ b/src/shared/os-util.c @@ -74,7 +74,7 @@ int fopen_os_release(const char *root, char **ret_path, FILE **ret_file) { if (r < 0) return r; - f = fdopen(fd, "re"); + f = fdopen(fd, "r"); if (!f) return -errno; fd = -1; |