close-on-exec
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23446 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -71,6 +71,7 @@ try_door(krb5_context context,
|
|||||||
fd = open(k->door_path, O_RDWR);
|
fd = open(k->door_path, O_RDWR);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return KRB5_CC_IO;
|
return KRB5_CC_IO;
|
||||||
|
rk_cloexec(fd);
|
||||||
|
|
||||||
arg.data_ptr = request_data->data;
|
arg.data_ptr = request_data->data;
|
||||||
arg.data_size = request_data->length;
|
arg.data_size = request_data->length;
|
||||||
@@ -107,7 +108,8 @@ try_unix_socket(krb5_context context,
|
|||||||
fd = socket(AF_UNIX, SOCK_STREAM, 0);
|
fd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return KRB5_CC_IO;
|
return KRB5_CC_IO;
|
||||||
|
rk_cloexec(fd);
|
||||||
|
|
||||||
if (connect(fd, rk_UNCONST(&k->path), sizeof(k->path)) != 0) {
|
if (connect(fd, rk_UNCONST(&k->path), sizeof(k->path)) != 0) {
|
||||||
close(fd);
|
close(fd);
|
||||||
return KRB5_CC_IO;
|
return KRB5_CC_IO;
|
||||||
|
Reference in New Issue
Block a user