forked from pool/systemd
38fe6dfa6d
- Make baselibs.conf aware to use the appropiate %post and %postun scriptlets which includes pam-config (bnc#877674) - Add upstram patches 0001-core-close-socket-fds-asynchronously.patch 0002-logind-bring-polkit-policy-for-hibernate-in-line-wit.patch 0003-core-make-sure-to-serialize-jobs-for-all-units.patch - Add upstram patches 0001-replace-more-dup-by-F_DUPFD_CLOEXEC.patch 0002-pam_systemd-use-F_DUPFD_CLOEXEC-when-dupping-session.patch to avoid that in pam session unwanted file descriptors are inherited - Make baselibs.conf aware to use the appropiate %post and %postun scriptlets which includes pam-config (bnc#877674) - Add upstram patches 0001-core-close-socket-fds-asynchronously.patch 0002-logind-bring-polkit-policy-for-hibernate-in-line-wit.patch 0003-core-make-sure-to-serialize-jobs-for-all-units.patch - Add upstram patches 0001-replace-more-dup-by-F_DUPFD_CLOEXEC.patch 0002-pam_systemd-use-F_DUPFD_CLOEXEC-when-dupping-session.patch to avoid that in pam session unwanted file descriptors are inherited OBS-URL: https://build.opensuse.org/request/show/234299 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=187
40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
From ead349509e325aad720bb0349521a9e56e2ac7c0 Mon Sep 17 00:00:00 2001
|
|
From: Lennart Poettering <lennart@poettering.net>
|
|
Date: Tue, 13 May 2014 16:40:53 +0200
|
|
Subject: [PATCH] replace more dup() by F_DUPFD_CLOEXEC
|
|
|
|
---
|
|
src/login/inhibit.c | 2 +-
|
|
src/shared/install.c | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git src/login/inhibit.c src/login/inhibit.c
|
|
index 48c2ec4..ae3afdf 100644
|
|
--- src/login/inhibit.c
|
|
+++ src/login/inhibit.c
|
|
@@ -64,7 +64,7 @@ static int inhibit(sd_bus *bus, sd_bus_error *error) {
|
|
if (r < 0)
|
|
return r;
|
|
|
|
- r = dup(fd);
|
|
+ r = fcntl(fd, F_DUPFD_CLOEXEC, 3);
|
|
if (r < 0)
|
|
return -errno;
|
|
|
|
diff --git src/shared/install.c src/shared/install.c
|
|
index acfba25..9ce9403 100644
|
|
--- src/shared/install.c
|
|
+++ src/shared/install.c
|
|
@@ -332,7 +332,7 @@ static int remove_marked_symlinks(
|
|
int q, cfd;
|
|
deleted = false;
|
|
|
|
- cfd = dup(fd);
|
|
+ cfd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
|
|
if (cfd < 0) {
|
|
r = -errno;
|
|
break;
|
|
--
|
|
1.7.9.2
|
|
|