summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/command.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-02-11 10:14:08 +0000
committerbrian <brian@FreeBSD.org>1999-02-11 10:14:08 +0000
commit5dc50d8ed53887553c9cb516e2b7915e55171a9f (patch)
treef9ab8c0680569eb7727b37072506b8ada5abb174 /usr.sbin/ppp/command.c
parent4ef23fab94c614e2e42029a09de004d3a1613d62 (diff)
downloadFreeBSD-src-5dc50d8ed53887553c9cb516e2b7915e55171a9f.zip
FreeBSD-src-5dc50d8ed53887553c9cb516e2b7915e55171a9f.tar.gz
When resending chap challenges, resend the same challenge
each time rather than making up a new one. Increase the authname/authkey max sizes to 100 characters. Allow ``authkey'' specifications beginning with ``!''. When a challenge is received, the text following the ``!'' is executed as a program (expanding stuff in the same way that ``sh'' and ``!bg'' do). The program is passed the peer name, peer challenge and local ``authname'' on standard input and is expected to output the name/key combination that should be used to build the CHAP response. This provides support for Secure ID cards (guess what I was given at work recently!) using CHAP. Examples will follow.
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r--usr.sbin/ppp/command.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 9245deb..00486af 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: command.c,v 1.178 1999/01/28 01:56:31 brian Exp $
+ * $Id: command.c,v 1.179 1999/01/28 09:40:15 brian Exp $
*
*/
#include <sys/param.h>
@@ -138,7 +138,7 @@
#define NEG_DNS 50
const char Version[] = "2.1";
-const char VersionDate[] = "$Date: 1999/01/28 01:56:31 $";
+const char VersionDate[] = "$Date: 1999/01/28 09:40:15 $";
static int ShowCommand(struct cmdargs const *);
static int TerminalCommand(struct cmdargs const *);
@@ -388,9 +388,9 @@ subst(char *tgt, const char *oldstr, const char *newstr)
return tgt;
}
-static void
-expand(char **nargv, int argc, char const *const *oargv, struct bundle *bundle,
- int inc0)
+void
+command_Expand(char **nargv, int argc, char const *const *oargv,
+ struct bundle *bundle, int inc0)
{
int arg;
char pid[12];
@@ -484,7 +484,7 @@ ShellCommand(struct cmdargs const *arg, int bg)
argc = sizeof argv / sizeof argv[0] - 1;
log_Printf(LogWARN, "Truncating shell command to %d args\n", argc);
}
- expand(argv, argc, arg->argv + arg->argn, arg->bundle, 0);
+ command_Expand(argv, argc, arg->argv + arg->argn, arg->bundle, 0);
if (bg) {
pid_t p;
@@ -2473,7 +2473,7 @@ SetProcTitle(struct cmdargs const *arg)
argc = sizeof argv / sizeof argv[0] - 1;
log_Printf(LogWARN, "Truncating proc title to %d args\n", argc);
}
- expand(argv, argc, arg->argv + arg->argn, arg->bundle, 1);
+ command_Expand(argv, argc, arg->argv + arg->argn, arg->bundle, 1);
ptr = title;
remaining = sizeof title - 1;
OpenPOWER on IntegriCloud