*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* Copyright 2004 Michael Richardson <mcr@sandelman.ottawa.on.ca>
+ * Copyright 2006 The FreeRADIUS server project
*
* (Adapted from rlm_files/rlm_files.c )
*/
*/
-static const char rcsid[] = "$Id$";
+#include <freeradius-devel/ident.h>
+RCSID("$Id$")
-#include "autoconf.h"
-#include "libradius.h"
+#include <freeradius-devel/radiusd.h>
+#include <freeradius-devel/modules.h>
#include <sys/stat.h>
-
-#include <stdlib.h>
-#include <string.h>
-#include <netdb.h>
#include <ctype.h>
#include <fcntl.h>
#include <limits.h>
-#include "radiusd.h"
-#include "modules.h"
#include "../rlm_eap/libeap/eap_sim.h"
struct sim_file_instance {
* Grab the canonical user name.
*/
namepair = request->username;
- name = namepair ? (char *) namepair->strvalue : "NONE";
+ name = namepair ? (char *) namepair->vp_strvalue : "NONE";
triplets = fopen(inst->file, "r");
/* globally exported name */
module_t rlm_sim_files = {
+ RLM_MODULE_INIT,
"sim_files",
0, /* type: reserved */
- NULL, /* initialization */
sim_file_instantiate, /* instantiation */
+ sim_file_detach, /* detach */
{
NULL, /* authentication */
sim_file_authorize, /* authorization */
NULL, /* post-proxy */
NULL /* post-auth */
},
- sim_file_detach, /* detach */
- NULL /* destroy */
};