]> git.ozlabs.org Git - ppp.git/commitdiff
pppd/auth: Pass ipparam to auth-up and auth-down scripts
authorJaco Kroon <jaco@uls.co.za>
Tue, 17 May 2022 08:05:27 +0000 (10:05 +0200)
committerPaul Mackerras <paulus@ozlabs.org>
Mon, 4 Jul 2022 07:52:22 +0000 (17:52 +1000)
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>
pppd/auth.c
pppd/pppd.8

index 01ece576ba2a7b5c57fffda29b4fb380d8b23e9a..fa32fea781362687c767442501afbdd7a6706c8c 100644 (file)
@@ -2407,7 +2407,8 @@ auth_script(char *script)
     argv[3] = user_name;
     argv[4] = devnam;
     argv[5] = strspeed;
     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);
 }
 
     auth_script_pid = run_program(script, argv, 0, auth_script_done, NULL, 0);
 }
index 60932c2f6c81faeeb34306a4dbb6ada52e3ddd01..79b5bea5c4a3fdf3220dfb158cfec8b5ad7051df 100644 (file)
@@ -524,7 +524,8 @@ Set the IPCP restart interval (retransmission timeout) to \fIn\fR
 seconds (default 3).
 .TP
 .B ipparam \fIstring
 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.
 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
 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.
 .IP
 Note that this script is not executed if the peer doesn't authenticate
 itself, for example when the \fInoauth\fR option is used.