]> git.sur5r.net Git - openldap/blobdiff - contrib/slapd-modules/passwd/radius.c
Merge remote-tracking branch 'origin/mdb.master'
[openldap] / contrib / slapd-modules / passwd / radius.c
index 22aa461eaf094ccf298c3ec28a3212ad3e64f909..f60f34f61bfb97d2bd85e8325f6a9816436b95ba 100644 (file)
@@ -1,6 +1,7 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2007 The OpenLDAP Foundation.
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2012 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -12,6 +13,8 @@
  * <http://www.OpenLDAP.org/license.html>.
  */
 
+#include "portable.h"
+
 #include <stdio.h>
 
 #include <lber.h>
@@ -23,6 +26,7 @@
 
 #include <radlib.h>
 
+extern char *global_host;      /* from slapd */
 static LUTIL_PASSWD_CHK_FUNC chk_radius;
 static const struct berval scheme = BER_BVC("{RADIUS}");
 static char *config_filename;
@@ -84,6 +88,10 @@ chk_radius(
                goto done;
        }
 
+       if ( rad_put_string( h, RAD_NAS_IDENTIFIER, global_host ) != 0 ) {
+               goto done;
+       }
+
        switch ( rad_send_request( h ) ) {
        case RAD_ACCESS_ACCEPT:
                rc = LUTIL_PASSWD_OK;