X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/e1d15f5e3b03bccb229281e762f9d47cf0933542..8d6d5106a6f1bcba010877d55932a8d8dcfa88bd:/src/src/auths/call_radius.c diff --git a/src/src/auths/call_radius.c b/src/src/auths/call_radius.c index 2064ed221..455000ea7 100644 --- a/src/src/auths/call_radius.c +++ b/src/src/auths/call_radius.c @@ -2,12 +2,22 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2009 */ +/* Copyright (c) University of Cambridge 1995 - 2015 */ /* See the file NOTICE for conditions of use and distribution. */ /* This file was originally supplied by Ian Kirk. The libradius support came from Alex Kiernan. */ +/* ugly hack to work around redefinition of ENV by radiusclient.h and + * db.h: define _DB_H_ so the db.h include thinks it's already included, + * we can get away with it like this, since this file doesn't use any db + * functions. */ +#ifndef _DB_H_ +# define _DB_H_ 1 +# define _DB_EXT_PROT_IN_ 1 +# define DB void +#endif + #include "../exim.h" /* This module contains functions that call the Radius authentication @@ -36,9 +46,14 @@ using its original API. At release 0.4.0 the API changed. */ #include #else #if !defined(RADIUS_LIB_RADIUSCLIENT) && !defined(RADIUS_LIB_RADIUSCLIENTNEW) - #define RADIUS_LIB_RADIUSCLIENT + # define RADIUS_LIB_RADIUSCLIENT + #endif + + #ifdef RADIUS_LIB_RADIUSCLIENTNEW + # include + #else + # include #endif - #include #endif @@ -60,10 +75,10 @@ Returns: OK if authentication succeeded */ int -auth_call_radius(uschar *s, uschar **errptr) +auth_call_radius(const uschar *s, uschar **errptr) { uschar *user; -uschar *radius_args = s; +const uschar *radius_args = s; int result; int sep = 0;