summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2002-07-04 23:35:09 +0000
committerbrian <brian@cvs.openbsd.org>2002-07-04 23:35:09 +0000
commit632edb6507464976655b30c715a8cf4e7de37bcd (patch)
treeec009d19913b4ee0ad46739494b7e42327954226 /usr.sbin
parentecd1d355a936dee799dcd6128ab4e069937fbe2c (diff)
Back out the previous revision
Objected to by: Andre Oppermann <oppermann@pipeline.ch> After Andre's objection, I've re-examined rfc 2759 and noted that it says that the domain name shouldn't be used when generating the NT-Response field. So it looks like the bug is in freeradius rather than in ppp.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ppp/radius.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/usr.sbin/ppp/ppp/radius.c b/usr.sbin/ppp/ppp/radius.c
index 44f7e0968ef..8dfbfb08960 100644
--- a/usr.sbin/ppp/ppp/radius.c
+++ b/usr.sbin/ppp/ppp/radius.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: radius.c,v 1.22 2002/07/03 20:52:24 brian Exp $
+ * $OpenBSD: radius.c,v 1.23 2002/07/04 23:35:08 brian Exp $
*
*/
@@ -725,7 +725,6 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
struct timeval tv;
int got;
char hostname[MAXHOSTNAMELEN];
- const char *basename;
#if 0
struct hostent *hp;
struct in_addr hostaddr;
@@ -765,10 +764,7 @@ radius_Authenticate(struct radius *r, struct authinfo *authp, const char *name,
return 0;
}
- /* Don't give any domain\ prefix from the name to the RADIUS server */
- basename = strchr(name, '\\');
- basename = basename ? basename + 1 : name;
- if (rad_put_string(r->cx.rad, RAD_USER_NAME, basename) != 0 ||
+ if (rad_put_string(r->cx.rad, RAD_USER_NAME, name) != 0 ||
rad_put_int(r->cx.rad, RAD_SERVICE_TYPE, RAD_FRAMED) != 0 ||
rad_put_int(r->cx.rad, RAD_FRAMED_PROTOCOL, RAD_PPP) != 0) {
log_Printf(LogERROR, "rad_put: %s\n", rad_strerror(r->cx.rad));
@@ -898,7 +894,6 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
struct timeval tv;
int got;
char hostname[MAXHOSTNAMELEN];
- const char *name;
#if 0
struct hostent *hp;
struct in_addr hostaddr;
@@ -935,13 +930,9 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
/* Grab some accounting data and initialize structure */
if (acct_type == RAD_START) {
- /* Don't give any domain\ prefix from the authname to the RADIUS server */
- name = strchr(dl->peer.authname, '\\');
- name = name ? name + 1 : dl->peer.authname;
-
ac->rad_parent = r;
/* Fetch username from datalink */
- strncpy(ac->user_name, name, sizeof ac->user_name);
+ strncpy(ac->user_name, dl->peer.authname, sizeof ac->user_name);
ac->user_name[AUTHLEN-1] = '\0';
ac->authentic = 2; /* Assume RADIUS verified auth data */
@@ -949,7 +940,7 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
/* Generate a session ID */
snprintf(ac->session_id, sizeof ac->session_id, "%s%ld-%s%lu",
dl->bundle->cfg.auth.name, (long)getpid(),
- name, (unsigned long)stats->uptime);
+ dl->peer.authname, (unsigned long)stats->uptime);
/* And grab our MP socket name */
snprintf(ac->multi_session_id, sizeof ac->multi_session_id, "%s",