]> git.sur5r.net Git - openldap/commitdiff
ITS#7357 set NAS-Identifier in request
authorHoward Chu <hyc@openldap.org>
Tue, 21 Aug 2012 20:30:02 +0000 (13:30 -0700)
committerHoward Chu <hyc@openldap.org>
Tue, 21 Aug 2012 20:30:02 +0000 (13:30 -0700)
contrib/slapd-modules/passwd/radius.c

index d8179fef20a69f51cf1bb86737e15c8bf34239d4..f60f34f61bfb97d2bd85e8325f6a9816436b95ba 100644 (file)
@@ -26,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;
@@ -87,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;