diff options
author | sos <sos@FreeBSD.org> | 1996-10-07 10:01:17 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1996-10-07 10:01:17 +0000 |
commit | 7510af99b91b6bfc22e5e977c98b60d22a0392eb (patch) | |
tree | c547c602971abf716d829698ca29e03a86fd5950 /usr.sbin | |
parent | 94ef229c1512a88647741b40d15fd7b6efa25d68 (diff) | |
download | FreeBSD-src-7510af99b91b6bfc22e5e977c98b60d22a0392eb.zip FreeBSD-src-7510af99b91b6bfc22e5e977c98b60d22a0392eb.tar.gz |
Add the feature to use MYADDR & HISADDR macroes as arguments to
a shell escape.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/command.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 62aa0d0..a03e23c 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.19 1996/09/28 11:25:47 bde Exp $ + * $Id: command.c,v 1.20 1996/10/06 13:32:27 jkh Exp $ * */ #include <sys/types.h> @@ -200,8 +200,18 @@ char **argv; exit(1); } TtyOldMode(); - if(argc > 0) + if(argc > 0) { + /* substitute pseudo args */ + for (i=1; i<argc; i++) { + if (strcmp(argv[i], "HISADDR") == 0) { + argv[i] = strdup(inet_ntoa(IpcpInfo.his_ipaddr)); + } + if (strcmp(argv[i], "MYADDR") == 0) { + argv[i] = strdup(inet_ntoa(IpcpInfo.want_ipaddr)); + } + } execvp(argv[0], argv); + } else execl(shell, shell, NULL); |