From 8cadbd70f4e8323f7e2901c774d5206cd456643f Mon Sep 17 00:00:00 2001 From: Samuel Varley Date: Thu, 26 Nov 2015 11:04:25 +1300 Subject: Thread safety: Store the name of conf file in radius_conf_t. I needed to move the position of the structures so I could use the CONST macro with the new member. --- src/pam_radius_auth.h | 70 ++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 34 deletions(-) (limited to 'src/pam_radius_auth.h') diff --git a/src/pam_radius_auth.h b/src/pam_radius_auth.h index defec5c..0882c53 100644 --- a/src/pam_radius_auth.h +++ b/src/pam_radius_auth.h @@ -47,40 +47,6 @@ #define MAXPROMPT 33 /* max prompt length, including '\0' */ #define DEFAULT_PROMPT "Password" /* default prompt, without the ': ' */ -/************************************************************************* - * Additional RADIUS definitions - *************************************************************************/ - -/* Per-attribute structure */ -typedef struct attribute_t { - unsigned char attribute; - unsigned char length; - unsigned char data[1]; -} attribute_t; - -typedef struct radius_server_t { - struct radius_server_t *next; - struct in_addr ip; - uint16_t port; - char *hostname; - char *secret; - int timeout; - int accounting; -} radius_server_t; - -typedef struct radius_conf_t { - radius_server_t *server; - int retries; - int localifdown; - char *client_id; - int accounting_bug; - int force_prompt; - int max_challenge; - int sockfd; - int debug; - char prompt[MAXPROMPT]; -} radius_conf_t; - /************************************************************************* * Platform specific defines @@ -146,4 +112,40 @@ typedef struct radius_conf_t { #define TRUE !FALSE #endif + +/************************************************************************* + * Additional RADIUS definitions + *************************************************************************/ + +/* Per-attribute structure */ +typedef struct attribute_t { + unsigned char attribute; + unsigned char length; + unsigned char data[1]; +} attribute_t; + +typedef struct radius_server_t { + struct radius_server_t *next; + struct in_addr ip; + uint16_t port; + char *hostname; + char *secret; + int timeout; + int accounting; +} radius_server_t; + +typedef struct radius_conf_t { + radius_server_t *server; + int retries; + int localifdown; + char *client_id; + int accounting_bug; + int force_prompt; + int max_challenge; + int sockfd; + int debug; + CONST char *conf_file; + char prompt[MAXPROMPT]; +} radius_conf_t; + #endif /* PAM_RADIUS_H */ -- cgit v1.2.3