summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2005-03-07 23:16:50 +0000
committerAlin Năstac <mrness@gentoo.org>2005-03-07 23:16:50 +0000
commit2727fda65416efd27f8237ae4c5fb57e6f0f1331 (patch)
tree54adf11caf6dd0fc6d6be2326db3ae8e6718b842 /net-dialup/rp-pppoe/files
parentSecurity bump: Fix #74070, #77666, #78362, #78363, #77923, #81106, #82141. (diff)
downloadhistorical-2727fda65416efd27f8237ae4c5fb57e6f0f1331.tar.gz
historical-2727fda65416efd27f8237ae4c5fb57e6f0f1331.tar.bz2
historical-2727fda65416efd27f8237ae4c5fb57e6f0f1331.zip
support special chars in username (#82410)
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-dialup/rp-pppoe/files')
-rw-r--r--net-dialup/rp-pppoe/files/digest-rp-pppoe-3.5-r82
-rw-r--r--net-dialup/rp-pppoe/files/rp-pppoe-3.5-username-charset.patch59
2 files changed, 61 insertions, 0 deletions
diff --git a/net-dialup/rp-pppoe/files/digest-rp-pppoe-3.5-r8 b/net-dialup/rp-pppoe/files/digest-rp-pppoe-3.5-r8
new file mode 100644
index 000000000000..e67ec4d3fe8f
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/digest-rp-pppoe-3.5-r8
@@ -0,0 +1,2 @@
+MD5 97972f8f8f6a3ab9b7070333a6a29c4b rp-pppoe-3.5.tar.gz 189321
+MD5 848f6c3cafeb6074ffeb293c3af79b7c ppp-2.4.3.tar.gz 688092
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.5-username-charset.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.5-username-charset.patch
new file mode 100644
index 000000000000..931bc38eb1ba
--- /dev/null
+++ b/net-dialup/rp-pppoe/files/rp-pppoe-3.5-username-charset.patch
@@ -0,0 +1,59 @@
+diff -Naur rp-pppoe-3.5.orig/scripts/adsl-setup.in rp-pppoe-3.5/scripts/adsl-setup.in
+--- rp-pppoe-3.5.orig/scripts/adsl-setup.in 2002-07-08 17:38:24.000000000 +0300
++++ rp-pppoe-3.5/scripts/adsl-setup.in 2005-03-08 01:06:46.248252496 +0200
+@@ -86,12 +86,16 @@
+ $ECHO "USER NAME"
+ $ECHO ""
+ $ECHO -n ">>> Enter your PPPoE user name (default $USER): "
+- read U
++ read Uu
++
++ U=`echo $Uu | sed -e "s/&/\\\\\&/g"` ;
++
+
+ if [ "$U" = "" ] ; then
+ U="$USER"
+ fi
+
++
+ # Under Linux, "fix" the default interface if eth1 is not available
+ if test `uname -s` = "Linux" ; then
+ $IFCONFIG $ETH > /dev/null 2>&1 || ETH=eth0
+@@ -221,7 +225,7 @@
+ $ECHO "** Summary of what you entered **"
+ $ECHO ""
+ $ECHO "Ethernet Interface: $E"
+- $ECHO "User name: $U"
++ $ECHO "User name: $Uu"
+ if [ "$D" = "no" ] ; then
+ $ECHO "Activate-on-demand: No"
+ else
+@@ -288,7 +292,12 @@
+ fi
+
+ # Some #$(*& ISP's use a slash in the user name...
+-sed -e "s&^USER=.*&USER='$U'&" \
++for SEP in ':' ';' '/' '!' '|' '_' '-' '@' ; do
++ if [ "$U" = `echo $U | sed "sI${SEP}II"` ]; then
++ break;
++ fi
++done
++sed -e "s${SEP}^USER=.*${SEP}USER='$U'${SEP}"\
+ -e "s&^ETH=.*&ETH='$E'&" \
+ -e "s&^PIDFILE=.*&PIDFILE=\"$VARRUN/\$CF_BASE-adsl.pid\"&" \
+ -e "s/^FIREWALL=.*/FIREWALL=$FIREWALL/" \
+@@ -337,10 +346,10 @@
+ cp /dev/null /etc/ppp/chap-secrets-bak
+ fi
+
+-egrep -v "^$U|^\"$U\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets
+-$ECHO "\"$U\" * \"$PWD1\"" >> /etc/ppp/pap-secrets
+-egrep -v "^$U|^\"$U\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets
+-$ECHO "\"$U\" * \"$PWD1\"" >> /etc/ppp/chap-secrets
++egrep -v "^$Uu|^\"$Uu\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets
++$ECHO "\"$Uu\" * \"$PWD1\"" >> /etc/ppp/pap-secrets
++egrep -v "^$Uu|^\"$Uu\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets
++$ECHO "\"$Uu\" * \"$PWD1\"" >> /etc/ppp/chap-secrets
+
+ $ECHO ""
+ $ECHO ""