chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1514d70
)
pam_systemd: use F_DUPFD_CLOEXEC when dupping session fds
author
Lennart Poettering
<lennart@poettering.net>
Tue, 13 May 2014 14:35:34 +0000
(16:35 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 13 May 2014 14:35:34 +0000
(16:35 +0200)
http://lists.freedesktop.org/archives/systemd-devel/2014-May/019034.html
src/login/pam-module.c
patch
|
blob
|
history
diff --git
a/src/login/pam-module.c
b/src/login/pam-module.c
index 9873dd547ae166e18f279b8987c3a2184baf9d60..1259457efc5f43351a6cf2f826e8a228cdeb91cf 100644
(file)
--- a/
src/login/pam-module.c
+++ b/
src/login/pam-module.c
@@
-475,7
+475,7
@@
_public_ PAM_EXTERN int pam_sm_open_session(
}
if (session_fd >= 0) {
- session_fd =
dup(session_fd
);
+ session_fd =
fcntl(session_fd, F_DUPFD_CLOEXEC, 3
);
if (session_fd < 0) {
pam_syslog(handle, LOG_ERR, "Failed to dup session fd: %m");
return PAM_SESSION_ERR;