summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn-setuid.c
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2018-12-12 14:58:46 +0000
committerLennart Poettering <lennart@poettering.net>2018-12-12 20:47:40 +0100
commite92aaed30e0b5750e5633765f1bddd51c96678e5 (patch)
treeb568cc092a868d3a4226f529e943d3cde8e72f82 /src/nspawn/nspawn-setuid.c
parent9be3c605706cd8430e330e9d16df372f5daccce2 (diff)
downloadsystemd-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/nspawn/nspawn-setuid.c')
-rw-r--r--src/nspawn/nspawn-setuid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn-setuid.c b/src/nspawn/nspawn-setuid.c
index 86fd9deec0..0026e4e3fc 100644
--- a/src/nspawn/nspawn-setuid.c
+++ b/src/nspawn/nspawn-setuid.c
@@ -91,7 +91,7 @@ int change_uid_gid(const char *user, char **_home) {
if (fd < 0)
return fd;
- f = fdopen(fd, "re");
+ f = fdopen(fd, "r");
if (!f)
return log_oom();
fd = -1;
@@ -164,7 +164,7 @@ int change_uid_gid(const char *user, char **_home) {
if (fd < 0)
return fd;
- f = fdopen(fd, "re");
+ f = fdopen(fd, "r");
if (!f)
return log_oom();
fd = -1;