From 66719e3277b5ade0798d3eadd6b9ff21d3db9739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sun, 27 Jul 2008 12:12:03 +0000 Subject: [PATCH] close-on-exec git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23455 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/softp11.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/hx509/softp11.c b/lib/hx509/softp11.c index c0acb9e11..4b7a28f8e 100644 --- a/lib/hx509/softp11.c +++ b/lib/hx509/softp11.c @@ -756,8 +756,11 @@ read_conf_file(const char *fn, CK_USER_TYPE userType, const char *pin) if (strcasecmp(name, "stdout") == 0) soft_token.logfile = stdout; - else + else { soft_token.logfile = fopen(name, "a"); + if (soft_token.logfile) + rk_cloexec_file(soft_token.logfile); + } if (soft_token.logfile == NULL) st_logf("failed to open file: %s\n", name);