Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 120582 Details for
Bug 180180
net-dialup/ppp patch for /etc/ppp/auth-fail
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ppp-2.4.4-auth_fail.patch
ppp-2.4.4-auth_fail.patch (text/plain), 4.07 KB, created by
Jaco Kroon
on 2007-05-29 05:20:59 UTC
(
hide
)
Description:
ppp-2.4.4-auth_fail.patch
Filename:
MIME Type:
Creator:
Jaco Kroon
Created:
2007-05-29 05:20:59 UTC
Size:
4.07 KB
patch
obsolete
>--- ppp-2.4.4.orig/pppd/auth.c 2006-06-18 13:26:00.000000000 +0200 >+++ ppp-2.4.4/pppd/auth.c 2007-05-29 00:03:23.000000000 +0200 >@@ -260,7 +260,7 @@ > struct wordlist **, struct wordlist **, > char *, int)); > static void free_wordlist __P((struct wordlist *)); >-static void auth_script __P((char *)); >+static void auth_script __P((char *, int)); > static void auth_script_done __P((void *)); > static void set_allowed_addrs __P((int, struct wordlist *, struct wordlist *)); > static int some_ip_ok __P((struct wordlist *)); >@@ -683,7 +683,7 @@ > if (auth_script_state == s_up && auth_script_pid == 0) { > update_link_stats(unit); > auth_script_state = s_down; >- auth_script(_PATH_AUTHDOWN); >+ auth_script(_PATH_AUTHDOWN, 0); > } > } > if (!doing_multilink) { >@@ -814,7 +814,7 @@ > auth_state = s_up; > if (auth_script_state == s_down && auth_script_pid == 0) { > auth_script_state = s_up; >- auth_script(_PATH_AUTHUP); >+ auth_script(_PATH_AUTHUP, 0); > } > } > >@@ -913,6 +913,7 @@ > * Authentication failure: take the link down > */ > status = EXIT_PEER_AUTH_FAILED; >+ auth_script(_PATH_AUTHFAIL, 1); > lcp_close(unit, "Authentication failed"); > } > >@@ -991,6 +992,7 @@ > * authentication secrets. > */ > status = EXIT_AUTH_TOPEER_FAILED; >+ auth_script(_PATH_AUTHFAIL, 1); > lcp_close(unit, "Failed to authenticate ourselves to peer"); > } > >@@ -2524,13 +2526,13 @@ > case s_up: > if (auth_state == s_down) { > auth_script_state = s_down; >- auth_script(_PATH_AUTHDOWN); >+ auth_script(_PATH_AUTHDOWN, 0); > } > break; > case s_down: > if (auth_state == s_up) { > auth_script_state = s_up; >- auth_script(_PATH_AUTHUP); >+ auth_script(_PATH_AUTHUP, 0); > } > break; > } >@@ -2541,8 +2543,9 @@ > * interface-name peer-name real-user tty speed > */ > static void >-auth_script(script) >+auth_script(script, wait) > char *script; >+ int wait; > { > char strspeed[32]; > struct passwd *pw; >@@ -2566,5 +2569,8 @@ > argv[5] = strspeed; > argv[6] = NULL; > >- auth_script_pid = run_program(script, argv, 0, auth_script_done, NULL, 0); >+ if (wait) >+ run_program(script, argv, 0, NULL, NULL, 1); >+ else >+ auth_script_pid = run_program(script, argv, 0, auth_script_done, NULL, 0); > } >--- ppp-2.4.4.orig/pppd/pathnames.h 2005-08-26 01:59:34.000000000 +0200 >+++ ppp-2.4.4/pppd/pathnames.h 2007-05-28 23:34:23.000000000 +0200 >@@ -27,6 +27,7 @@ > #define _PATH_IPPREUP _ROOT_PATH "/etc/ppp/ip-pre-up" > #define _PATH_AUTHUP _ROOT_PATH "/etc/ppp/auth-up" > #define _PATH_AUTHDOWN _ROOT_PATH "/etc/ppp/auth-down" >+#define _PATH_AUTHFAIL _ROOT_PATH "/etc/ppp/auth-fail" > #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options." > #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors" > #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/" >--- ppp-2.4.4.orig/pppd/pppd.8 2006-06-16 02:01:23.000000000 +0200 >+++ ppp-2.4.4/pppd/pppd.8 2007-05-28 23:48:20.000000000 +0200 >@@ -1531,8 +1531,8 @@ > Pppd invokes scripts at various stages in its processing which can be > used to perform site-specific ancillary processing. These scripts are > usually shell scripts, but could be executable code files instead. >-Pppd does not wait for the scripts to finish (except for the ip-pre-up >-script). The scripts are >+Pppd does not wait for the scripts to finish (except for the ip-pre-up, >+and auth-fail scripts). The scripts are > executed as root (with the real and effective user-id set to 0), so > that they can do things such as update routing tables or run > privileged daemons. Be careful that the contents of these scripts do >@@ -1612,6 +1612,11 @@ > /etc/ppp/auth\-up was previously executed. It is executed in the same > manner with the same parameters as /etc/ppp/auth\-up. > .TP >+.B /etc/ppp/auth\-fail >+A program or script which is execute should authentication fail. pppd >+waits for this script to finish. It is execute in the same manner with >+the same parameters as /etc/ppp/auth\-up. >+.TP > .B /etc/ppp/ip\-pre\-up > A program or script which is executed just before the ppp network > interface is brought up. It is executed with the same parameters as
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 180180
:
120582
|
120663
|
121807
|
121809
|
121887