"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/modules/rlm_mschap/rlm_mschap.c" between
freeradius-server-3.0.22.tar.bz2 and freeradius-server-3.0.23.tar.bz2

About: FreeRADIUS Server Project - a high performance and highly configurable RADIUS server.

rlm_mschap.c  (freeradius-server-3.0.22.tar.bz2):rlm_mschap.c  (freeradius-server-3.0.23.tar.bz2)
skipping to change at line 18 skipping to change at line 18
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/** /**
* $Id: 98bbff05f257c664edc1a330b0565cfa849bcb6d $ * $Id: 5b17676a9f62b23c85ff70f6dbb1c42033fc13d6 $
* @file rlm_mschap.c * @file rlm_mschap.c
* @brief Implemented mschap authentication. * @brief Implemented mschap authentication.
* *
* @copyright 2000,2001,2006 The FreeRADIUS server project * @copyright 2000,2001,2006 The FreeRADIUS server project
*/ */
/* MPPE support from Takahiro Wagatsuma <waga@sic.shibaura-it.ac.jp> */ /* MPPE support from Takahiro Wagatsuma <waga@sic.shibaura-it.ac.jp> */
RCSID("$Id: 98bbff05f257c664edc1a330b0565cfa849bcb6d $") RCSID("$Id: 5b17676a9f62b23c85ff70f6dbb1c42033fc13d6 $")
#include <freeradius-devel/radiusd.h> #include <freeradius-devel/radiusd.h>
#include <freeradius-devel/modules.h> #include <freeradius-devel/modules.h>
#include <freeradius-devel/rad_assert.h> #include <freeradius-devel/rad_assert.h>
#include <freeradius-devel/md5.h> #include <freeradius-devel/md5.h>
#include <freeradius-devel/sha1.h> #include <freeradius-devel/sha1.h>
#include <ctype.h> #include <ctype.h>
#include "rlm_mschap.h" #include "rlm_mschap.h"
skipping to change at line 325 skipping to change at line 325
* if the second octet says so. * if the second octet says so.
*/ */
if ((response->vp_octets[1] & 0x01) != 0) { if ((response->vp_octets[1] & 0x01) != 0) {
REDEBUG("No LM-Response in MS-CHAP-Response"); REDEBUG("No LM-Response in MS-CHAP-Response");
return -1; return -1;
} }
data = response->vp_octets + 2; data = response->vp_octets + 2;
data_len = 24; data_len = 24;
/* /*
* Pull the domain name out of the User-Name, if it exists.
*
* This is the full domain name, not just the name after host/
*/
} else if (strncasecmp(fmt, "Domain-Name", 11) == 0) {
char *p;
user_name = fr_pair_find_by_num(request->packet->vps, PW_USER_NAM
E, 0, TAG_ANY);
if (!user_name) {
REDEBUG("No User-Name was found in the request");
return -1;
}
/*
* First check to see if this is a host/ style User-Name
* (a la Kerberos host principal)
*/
if (strncmp(user_name->vp_strvalue, "host/", 5) == 0) {
/*
* If we're getting a User-Name formatted in this wa
y,
* it's likely due to PEAP. The Windows Domain will
be
* the first domain component following the hostname
,
* or the machine name itself if only a hostname is
supplied
*/
p = strchr(user_name->vp_strvalue, '.');
if (!p) {
RDEBUG2("setting NT-Domain to same as machine nam
e");
strlcpy(out, user_name->vp_strvalue + 5, outlen);
} else {
p++; /* skip the period */
strlcpy(out, p, outlen);
}
} else {
p = strchr(user_name->vp_strvalue, '\\');
if (!p) {
REDEBUG("No NT-Domain was found in the User-Name"
);
return -1;
}
/*
* Hack. This is simpler than the alternatives.
*/
*p = '\0';
strlcpy(out, user_name->vp_strvalue, outlen);
*p = '\\';
}
return strlen(out);
/*
* Pull the NT-Domain out of the User-Name, if it exists. * Pull the NT-Domain out of the User-Name, if it exists.
*/ */
} else if (strncasecmp(fmt, "NT-Domain", 9) == 0) { } else if (strncasecmp(fmt, "NT-Domain", 9) == 0) {
char *p, *q; char *p, *q;
user_name = fr_pair_find_by_num(request->packet->vps, PW_USER_NAM E, 0, TAG_ANY); user_name = fr_pair_find_by_num(request->packet->vps, PW_USER_NAM E, 0, TAG_ANY);
if (!user_name) { if (!user_name) {
REDEBUG("No User-Name was found in the request"); REDEBUG("No User-Name was found in the request");
return -1; return -1;
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 59 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)