summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/dm_coa.c
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-01-13 12:38:26 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-01-13 12:38:26 +0400
commitbf1ccc7f6e7a9dc5a8ba3d8d02b25ad446458840 (patch)
tree4e53a7f2990e40436f6ae98434f72c3db14434c0 /accel-pppd/radius/dm_coa.c
parent03a466f1b0f7549c2ef89c1e544c2c86c3958ad4 (diff)
downloadaccel-ppp-bf1ccc7f6e7a9dc5a8ba3d8d02b25ad446458840.tar.gz
accel-ppp-bf1ccc7f6e7a9dc5a8ba3d8d02b25ad446458840.zip
set FD_CLOEXEC on opened file descriptors
Diffstat (limited to 'accel-pppd/radius/dm_coa.c')
-rw-r--r--accel-pppd/radius/dm_coa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/accel-pppd/radius/dm_coa.c b/accel-pppd/radius/dm_coa.c
index a41388cf..f6197e7c 100644
--- a/accel-pppd/radius/dm_coa.c
+++ b/accel-pppd/radius/dm_coa.c
@@ -271,6 +271,9 @@ static void init(void)
log_emerg("radius:dm_coa: socket: %s\n", strerror(errno));
return;
}
+
+ fcntl(serv.hnd.fd, F_SETFD, fcntl(serv.hnd.fd, F_GETFD) | FD_CLOEXEC);
+
addr.sin_family = AF_INET;
addr.sin_port = htons (conf_dm_coa_port);
if (conf_dm_coa_server)