aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2019-01-30 23:43:12 +0100
committerDuncaen <mail@duncano.de>2019-01-30 23:43:12 +0100
commit8b2a776ddd47b74bb814a00ea7af3cc970063db7 (patch)
tree404fe1c5ba38ecaff24c85cdc5f593e0db15953c
parent38e072b353f5b1325bbf52dfb759fe49ff6ef0f7 (diff)
downloadopendoas-8b2a776ddd47b74bb814a00ea7af3cc970063db7.tar.gz
pam: close timestamp fd in both both processes
-rw-r--r--pam.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pam.c b/pam.c
index e0f17a5..c5a3001 100644
--- a/pam.c
+++ b/pam.c
@@ -323,8 +323,13 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p
}
/* return as child */
- if (child == 0)
+ if (child == 0) {
+#ifdef USE_TIMESTAMP
+ if (fd != -1)
+ close(fd);
+#endif
return;
+ }
#ifdef USE_TIMESTAMP
if (fd != -1) {