* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define RCSID "$Id: chap.c,v 1.35 2002/10/12 01:28:05 fcusack Exp $"
+#define RCSID "$Id: chap.c,v 1.37 2002/10/12 20:09:36 fcusack Exp $"
/*
* TODO:
UNTIMEOUT(ChapChallengeTimeout, cstate);
- if (len >= sizeof(rhostname))
- len = sizeof(rhostname) - 1;
- BCOPY(inp, rhostname, len);
- rhostname[len] = '\000';
+ /* Null terminate and clean remote name. */
+ slprintf(rhostname, sizeof(rhostname), "%.*v", len, inp);
#ifdef CHAPMS
/* copy the flags into cstate for use elsewhere */
if (!auth_number()) {
/* We do not want to leak info about the chap result. */
code = CHAP_FAILURE; /* XXX exit value will be "wrong" */
- error("calling number %q is not authorized", remote_number);
+ warn("calling number %q is not authorized", remote_number);
}
}