From b417b79ee6e420bfaace6b987e7856713999337d Mon Sep 17 00:00:00 2001 From: Jaco Kroon Date: Tue, 17 May 2022 10:05:27 +0200 Subject: [PATCH] pppd/auth: Pass ipparam to auth-up and auth-down scripts ipparam is the only way a system administrator has of passing arbitrary information from options files to scripts, and this may be useful during auth-up in particular. (If upstream pppd had support for an auth-fail script, it could be useful there too.) Signed-off-by: Jaco Kroon Signed-off-by: Paul Mackerras --- pppd/auth.c | 3 ++- pppd/pppd.8 | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pppd/auth.c b/pppd/auth.c index 01ece57..fa32fea 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -2407,7 +2407,8 @@ auth_script(char *script) argv[3] = user_name; argv[4] = devnam; argv[5] = strspeed; - argv[6] = NULL; + argv[6] = ipparam; + argv[7] = NULL; auth_script_pid = run_program(script, argv, 0, auth_script_done, NULL, 0); } diff --git a/pppd/pppd.8 b/pppd/pppd.8 index 60932c2..79b5bea 100644 --- a/pppd/pppd.8 +++ b/pppd/pppd.8 @@ -524,7 +524,8 @@ Set the IPCP restart interval (retransmission timeout) to \fIn\fR seconds (default 3). .TP .B ipparam \fIstring -Provides an extra parameter to the ip\-up, ip\-pre\-up and ip\-down +Provides an extra parameter most of the notification scripts, most notably +ip\-up, ip\-pre\-up, ip\-down, ipv6\-up, ipv6\-down, auth\-up and auth\-down scripts. If this option is given, the \fIstring\fR supplied is given as the 6th parameter to those scripts. @@ -1821,7 +1822,7 @@ if they don't exist. A program or script which is executed after the remote system successfully authenticates itself. It is executed with the parameters .IP -\fIinterface\-name peer\-name user\-name tty\-device speed\fR +\fIinterface\-name peer\-name user\-name tty\-device speed ipparam\fR .IP Note that this script is not executed if the peer doesn't authenticate itself, for example when the \fInoauth\fR option is used. -- 2.39.2