diff options
author | Samuel Varley <samuel.varley@alliedtelesis.co.nz> | 2015-11-26 11:04:25 +1300 |
---|---|---|
committer | Samuel Varley <samuel.varley@alliedtelesis.co.nz> | 2015-12-10 12:45:13 +1300 |
commit | 8cadbd70f4e8323f7e2901c774d5206cd456643f (patch) | |
tree | 42ab59427ea790517bb401e6e61cf6f695e1b565 /src/pam_radius_auth.h | |
parent | 14664dab2d129a7f975648930a1594bdcc1b374a (diff) | |
download | libpam-radius-auth-8cadbd70f4e8323f7e2901c774d5206cd456643f.tar.gz libpam-radius-auth-8cadbd70f4e8323f7e2901c774d5206cd456643f.zip |
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.
Diffstat (limited to 'src/pam_radius_auth.h')
-rw-r--r-- | src/pam_radius_auth.h | 70 |
1 files changed, 36 insertions, 34 deletions
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 */ |