From bf1ccc7f6e7a9dc5a8ba3d8d02b25ad446458840 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Fri, 13 Jan 2012 12:38:26 +0400 Subject: set FD_CLOEXEC on opened file descriptors --- accel-pppd/auth/auth_chap_md5.c | 9 --------- accel-pppd/auth/auth_mschap_v1.c | 8 -------- accel-pppd/auth/auth_mschap_v2.c | 8 -------- 3 files changed, 25 deletions(-) (limited to 'accel-pppd/auth') diff --git a/accel-pppd/auth/auth_chap_md5.c b/accel-pppd/auth/auth_chap_md5.c index cc27ba37..d5db85f5 100644 --- a/accel-pppd/auth/auth_chap_md5.c +++ b/accel-pppd/auth/auth_chap_md5.c @@ -37,8 +37,6 @@ static int conf_interval = 0; static int conf_max_failure = 3; static int conf_any_login = 0; -static int urandom_fd; - struct chap_hdr_t { uint16_t proto; @@ -438,13 +436,6 @@ static void load_config(void) static void auth_chap_md5_init() { - urandom_fd=open("/dev/urandom", O_RDONLY); - - if (urandom_fd < 0) { - log_emerg("chap-md5: failed to open /dev/urandom: %s\n", strerror(errno)); - return; - } - load_config(); if (ppp_auth_register_handler(&chap)) diff --git a/accel-pppd/auth/auth_mschap_v1.c b/accel-pppd/auth/auth_mschap_v1.c index 2d332524..ffe0200c 100644 --- a/accel-pppd/auth/auth_mschap_v1.c +++ b/accel-pppd/auth/auth_mschap_v1.c @@ -39,8 +39,6 @@ static char *conf_msg_failure = "E=691 R=0"; static char *conf_msg_success = "Authentication successed"; ; -static int urandom_fd; - struct chap_hdr_t { uint16_t proto; @@ -504,12 +502,6 @@ static void load_config(void) static void auth_mschap_v1_init() { - urandom_fd = open("/dev/urandom", O_RDONLY); - if (urandom_fd < 0) { - log_emerg("mschap-v1: failed to open /dev/urandom: %s\n", strerror(errno)); - return; - } - load_config(); if (ppp_auth_register_handler(&chap)) diff --git a/accel-pppd/auth/auth_mschap_v2.c b/accel-pppd/auth/auth_mschap_v2.c index cb972075..d067f0b7 100644 --- a/accel-pppd/auth/auth_mschap_v2.c +++ b/accel-pppd/auth/auth_mschap_v2.c @@ -38,8 +38,6 @@ static char *conf_msg_failure = "E=691 R=0 V=3"; static char *conf_msg_failure2 = "Authentication failure"; static char *conf_msg_success = "Authentication successed"; -static int urandom_fd; - struct chap_hdr_t { uint16_t proto; @@ -637,12 +635,6 @@ static void load_config(void) static void auth_mschap_v2_init() { - urandom_fd = open("/dev/urandom", O_RDONLY); - if (urandom_fd < 0) { - log_emerg("mschap-v2: failed to open /dev/urandom: %s\n", strerror(errno)); - return; - } - load_config(); if (ppp_auth_register_handler(&chap)) -- cgit v1.2.3