close-on-exec

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

View File

@@ -248,6 +248,7 @@ erase_file(krb5_context context, const char *filename)
else else
return errno; return errno;
} }
rk_cloexec(fd);
ret = _krb5_xlock(context, fd, 1, filename); ret = _krb5_xlock(context, fd, 1, filename);
if (ret) { if (ret) {
close(fd); close(fd);
@@ -372,6 +373,7 @@ fcc_open(krb5_context context,
strerror(ret)); strerror(ret));
return ret; return ret;
} }
rk_cloexec(fd);
if((ret = fcc_lock(context, id, fd, exclusive)) != 0) { if((ret = fcc_lock(context, id, fd, exclusive)) != 0) {
close(fd); close(fd);