close-on-exec

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

View File

@@ -2972,6 +2972,7 @@ _hx509_query_statistic(hx509_context context, int type, const hx509_query *q)
f = fopen(context->querystat, "a");
if (f == NULL)
return;
rk_cloexec_file(f);
fprintf(f, "%d %d\n", type, q->match);
fclose(f);
}
@@ -3042,6 +3043,7 @@ hx509_query_unparse_stats(hx509_context context, int printtype, FILE *out)
context->querystat, strerror(errno));
return;
}
rk_cloexec_file(f);
for (i = 0; i < sizeof(stats)/sizeof(stats[0]); i++) {
stats[i].index = i;