ALT Linux Bugzilla
– Attachment 2469 Details for
Bug 14649
ppptp & pppoe with equals logins
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
pppoe-net patch
alterator-pppoe.patch (text/plain), 1.71 KB, created by
Konstantin Uvarin (lodin)
on 2008-03-02 23:22:32 MSK
(
hide
)
Description:
pppoe-net patch
Filename:
MIME Type:
Creator:
Konstantin Uvarin (lodin)
Created:
2008-03-02 23:22:32 MSK
Size:
1.71 KB
patch
obsolete
>--- backend3.orig/net-pppoe 2008-03-02 21:04:00 +0300 >+++ backend3/net-pppoe 2008-03-02 23:19:04 +0300 >@@ -1,7 +1,6 @@ > #!/bin/sh -ef > > PATH=/usr/lib/alterator-net-common:$PATH >-chapfile=/etc/ppp/chap-secrets > > ################### shell file helpers > >@@ -79,12 +78,14 @@ > > if [ -n "$in_login" ] ;then > sed -r "s,^user[[:space:]].*,user $in_login," -i "$name/pppoptions" >- sed -r "s,^$prev_login[[:space:]]*,$in_login ," -i "$chapfile" > prev_login="$in_login" > fi > if [ -n "$in_password" ]; then > in_password=$(echo "$in_password"|sed -e 's/["]/\\\\&/g') >- sed -r "s,^$prev_login[[:space:]].*,$prev_login * \"$in_password\" *," -i "$chapfile" >+ sed -r "s,^password[[:space:]].*,password $in_password," -i "$name/pppoptions" >+ >+ # deny users from reading the password >+ chmod o-rw "$name/pppoptions" > fi > > ifdown "$1" && ifup "$1" >@@ -92,8 +93,6 @@ > > new_iface() > { >- grep -qs "^$in_login[[:space:]]" "$chapfile" && return 1 >- > local name="/etc/net/ifaces/$1" > in_password=$(echo "$in_password"|sed -e 's/["]/\\\\&/g') > >@@ -105,9 +104,11 @@ > shell_add_or_subst "PPPMAXFAIL=" "0" "$name/options" > > shell_add_or_subst "user " "$in_login" "$name/pppoptions" >- >- echo "$in_login * \"$in_password\" *" >>"$chapfile" >- >+ shell_add_or_subst "password " "$in_password" "$name/pppoptions" >+ >+ # deny users from reading the password >+ chmod o-rw "$name/pppoptions" >+ > ifup "$1" > return 0 > } >@@ -119,10 +120,9 @@ > local name="/etc/net/ifaces/$1" > local prev_login="$(grep '^user' "$name/pppoptions"|sed -r 's,user[[:space:]]*,,')" > >- sed -r "/^$prev_login[[:space:]]/ d" -i "$chapfile" >- rm -rf "$name" >- >- ifdown "$1" >+ # do ifdown before rm so that ifup-{pre,post} are executed >+ ifdown "$1" >+ rm -rf "$name" > } > > _()
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 14649
:
2462
|
2467
|
2468
| 2469