close-on-exec

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23455 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-07-27 12:12:03 +00:00
parent b227a5249d
commit 66719e3277

View File

@@ -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);