*/
#ifndef lint
-static char rcsid[] = "$Id: chap.c,v 1.15 1997/11/27 06:07:48 paulus Exp $";
+static char rcsid[] = "$Id: chap.c,v 1.18 1999/03/12 06:07:15 paulus Exp $";
#endif
/*
#include "chap_ms.h"
#endif
+/*
+ * Command-line options.
+ */
+static option_t chap_option_list[] = {
+ { "chap-restart", o_int, &chap[0].timeouttime,
+ "Set timeout for CHAP" },
+ { "chap-max-challenge", o_int, &chap[0].max_transmits,
+ "Set max #xmits for challenge" },
+ { "chap-interval", o_int, &chap[0].chal_interval,
+ "Set interval for rechallenge" },
+#ifdef MSLANMAN
+ { "ms-lanman", o_bool, &ms_lanman,
+ "Use LanMan passwd when using MS-CHAP", 1 },
+#endif
+ { NULL }
+};
+
/*
* Protocol entry points.
*/
NULL,
1,
"CHAP",
+ chap_option_list,
NULL,
NULL,
NULL
/* Microsoft doesn't send their name back in the PPP packet */
if (remote_name[0] != 0 && (explicit_remote || rhostname[0] == 0)) {
- strncpy(rhostname, remote_name, sizeof(rhostname));
- rhostname[sizeof(rhostname) - 1] = 0;
+ strlcpy(rhostname, sizeof(rhostname), remote_name);
CHAPDEBUG((LOG_INFO, "ChapReceiveChallenge: using '%s' as remote name",
rhostname));
}