use SOCK_CLOEXEC

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23517 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-08-11 10:01:38 +00:00
parent 8efac579af
commit 4384fb0209
4 changed files with 9 additions and 4 deletions

View File

@@ -105,7 +105,7 @@ try_unix_socket(krb5_context context,
krb5_error_code ret;
int fd;
fd = socket(AF_UNIX, SOCK_STREAM, 0);
fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
if (fd < 0)
return KRB5_CC_IO;
rk_cloexec(fd);