summaryrefslogtreecommitdiff
path: root/pppd
diff options
context:
space:
mode:
authorJaco Kroon <jaco@uls.co.za>2022-05-17 10:05:27 +0200
committerPaul Mackerras <paulus@ozlabs.org>2022-07-04 17:52:22 +1000
commitb417b79ee6e420bfaace6b987e7856713999337d (patch)
tree9bbdcd3280550287a906550c3b654ea00c560747 /pppd
parentd7e62a8499c4032d79e05afbd8fd3efd51c5b148 (diff)
downloadppp-b417b79ee6e420bfaace6b987e7856713999337d.tar.gz
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 <jaco@uls.co.za> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'pppd')
-rw-r--r--pppd/auth.c3
-rw-r--r--pppd/pppd.85
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.