aboutsummaryrefslogtreecommitdiff
path: root/nis
diff options
context:
space:
mode:
Diffstat (limited to 'nis')
-rw-r--r--nis/nis_findserv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nis/nis_findserv.c b/nis/nis_findserv.c
index 77f3c7c..8e01164 100644
--- a/nis/nis_findserv.c
+++ b/nis/nis_findserv.c
@@ -142,7 +142,7 @@ __nis_findfastest_with_timeout (dir_binding *bind,
}
/* Create RPC handle */
- sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ sock = socket (AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP);
clnt = clntudp_create (&saved_sin, NIS_PROG, NIS_VERSION, *timeout, &sock);
if (clnt == NULL)
{