Package: pppoeconf
Version: 1.1
Severity: normal
Tags: patch

On my system, /etc/ppp/peers/dsl-provider is being created
0600:root:root, independent of the umask, and ignoring the fact that
the directory is 2750:root:dip.

As a consequence, dip-members cannot establish DSL connections
without admin intervention.

The problem likely stems from my 077 umask and the use of ACLs. You
use sed to create a new file, which you move over the old one.

The solution is to use sed inplace; the attached patch does so.

PS: I also fixed your email address in the manpage while I was at
it.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (600, 'testing'), (98, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-wing
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages pppoeconf depends on:
ii  gettext-base            0.14.1-10        GNU Internationalization utilities
ii  ppp                     2.4.2+20040428-6 Point-to-Point Protocol (PPP) daem
ii  whiptail [whiptail-prov 0.51.6-20        Displays user-friendly dialog boxe

-- no debconf information

-- 
 .''`.     martin f. krafft <[EMAIL PROTECTED]>
: :'  :    proud Debian developer, admin, user, and author
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!
diff -Nru /tmp/Z8kJUqnfgj/pppoeconf-1.1/debian/changelog 
/tmp/fStPjEoC2U/pppoeconf-1.1/debian/changelog
--- /tmp/Z8kJUqnfgj/pppoeconf-1.1/debian/changelog      2005-02-18 
01:11:50.000000000 +0100
+++ /tmp/fStPjEoC2U/pppoeconf-1.1/debian/changelog      2005-02-24 
16:51:29.000000000 +0100
@@ -1,3 +1,12 @@
+pppoeconf (1.1-0.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Fix permissions problem of generated dsl-provider file when umask is set
+    to more than 022, or ACLs are being used (which prevent setgid on
+    directories, it seems).
+
+ -- martin f. krafft <[EMAIL PROTECTED]>  Thu, 24 Feb 2005 16:47:23 +0100
+
 pppoeconf (1.1) unstable; urgency=high
 
   * do not stumble over PPP usernames with slashes within (closes: #295315)
diff -Nru /tmp/Z8kJUqnfgj/pppoeconf-1.1/pppoeconf 
/tmp/fStPjEoC2U/pppoeconf-1.1/pppoeconf
--- /tmp/Z8kJUqnfgj/pppoeconf-1.1/pppoeconf     2005-02-18 01:06:32.000000000 
+0100
+++ /tmp/fStPjEoC2U/pppoeconf-1.1/pppoeconf     2005-02-24 16:54:24.000000000 
+0100
@@ -218,12 +218,11 @@
        grep -q "^plugin.*rp-pppoe.so" $OPTSFILE || echo "plugin rp-pppoe.so 
$iface" >> $OPTSFILE
        # disable the pppoe tunnel command
        if grep -q '^pty' $OPTSFILE ; then
-          sed -e 's/^pty/#pty/' $OPTSFILE > "$sectempfile" ; mv -f 
"$sectempfile" $OPTSFILE
+          sed -i -e 's/^pty/#pty/' $OPTSFILE
        fi
 
        # set the interface
-       sed -e "s,^plugin.\+rp-pppoe.so[[:space:]]\+[[:alnum:]]*,plugin 
rp-pppoe.so $ifacenocomma," $OPTSFILE > "$sectempfile"
-       mv "$sectempfile" $OPTSFILE
+       sed -i -e "s,^plugin.\+rp-pppoe.so[[:space:]]\+[[:alnum:]]*,plugin 
rp-pppoe.so $ifacenocomma," $OPTSFILE
     else
        # sanity check first, fix the config file
 
@@ -236,8 +235,7 @@
        grep -q '^pty' $OPTSFILE || echo 'pty "pppoe -I eth0 -T 80"' >> 
$OPTSFILE
 
        # set the interface
-       sed -e "s,-I[[:space:]]*[[:alnum:]]*,-I $ifacenocomma," $OPTSFILE > 
"$sectempfile"
-       mv "$sectempfile" $OPTSFILE
+       sed -i -e "s,-I[[:space:]]*[[:alnum:]]*,-I $ifacenocomma," $OPTSFILE
     fi
     # fix final newline
     test -e /etc/ppp/pap-secrets && ( [ $(tail -1 /etc/ppp/pap-secrets | wc 
-l) -eq 0 ] || echo >> /etc/ppp/pap-secrets )
@@ -268,10 +266,8 @@
   if test "$?" = "0" ; then
     grep -q '^noauth' $OPTSFILE || echo 'noauth' >> $OPTSFILE
     grep -q '^defaultroute' $OPTSFILE  || echo 'defaultroute' >> $OPTSFILE
-    sed -e "s/^nodetach.*//" $OPTSFILE > "$sectempfile"
-    mv "$sectempfile" $OPTSFILE
-#    sed -e "s/^lcp-echo-interval 20$/lcp-echo-interval 60/" $OPTSFILE > 
"$sectempfile"
-#    mv "$sectempfile" $OPTSFILE
+    sed -i -e "s/^nodetach.*//" $OPTSFILE
+#    sed -i -e "s/^lcp-echo-interval 20$/lcp-echo-interval 60/" $OPTSFILE
   fi
   
   user=`grep ^user $OPTSFILE|cut -f2 -d" " | tr -d '"'`
@@ -286,8 +282,7 @@
     if test -z "$user" ; then
       $DIALOG --scrolltext --textbox "$TMP/namehelp.txt" 17 75
     else
-      sed -e 's/^user .*//' $OPTSFILE > "$sectempfile"
-      mv "$sectempfile" $OPTSFILE
+      sed -i -e 's/^user .*//' $OPTSFILE
       echo  "user \"$user\"" >> $OPTSFILE
       goahead="yes"
       export goahead
@@ -349,11 +344,9 @@
         chmod 755 /etc/ppp/ip-up.d/0clampmss
      else
         # disable the old line
-        sed -e 's/^pty/#&/' $OPTSFILE > "$sectempfile"
-        mv "$sectempfile" $OPTSFILE
+        sed -i -e 's/^pty/#&/' $OPTSFILE
         # enable the one with our mss size
-        sed -e 's/^#\(pty.*-m 1452.*\)/\1/' $OPTSFILE > "$sectempfile"
-        mv "$sectempfile" $OPTSFILE
+        sed -i -e 's/^#\(pty.*-m 1452.*\)/\1/' $OPTSFILE
         rm -f "$sectempfile"
      fi
      ;;
diff -Nru /tmp/Z8kJUqnfgj/pppoeconf-1.1/pppoeconf.8 
/tmp/fStPjEoC2U/pppoeconf-1.1/pppoeconf.8
--- /tmp/Z8kJUqnfgj/pppoeconf-1.1/pppoeconf.8   2001-12-10 10:22:25.000000000 
+0100
+++ /tmp/fStPjEoC2U/pppoeconf-1.1/pppoeconf.8   2005-02-24 16:55:49.000000000 
+0100
@@ -73,7 +73,7 @@
 pppoe (8), pppd (8). 
 .SH "AUTHOR" 
 .PP 
-This manual page was written by Eduard Bloch [EMAIL PROTECTED] for 
+This manual page was written by Eduard Bloch [EMAIL PROTECTED] for 
 the \fBDebian GNU/Linux\fP system (but may be used by others).  Permission is 
 granted to copy, distribute and/or modify this document under 
 the terms of the GNU Free Documentation 
diff -Nru /tmp/Z8kJUqnfgj/pppoeconf-1.1/pppoeconf.8.sgml 
/tmp/fStPjEoC2U/pppoeconf-1.1/pppoeconf.8.sgml
--- /tmp/Z8kJUqnfgj/pppoeconf-1.1/pppoeconf.8.sgml      2001-12-10 
10:22:24.000000000 +0100
+++ /tmp/fStPjEoC2U/pppoeconf-1.1/pppoeconf.8.sgml      2005-02-24 
16:55:25.000000000 +0100
@@ -17,7 +17,7 @@
   <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
        allowed: see man(7), man(1). -->
   <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
-  <!ENTITY dhemail     "<email>[EMAIL PROTECTED]</email>">
+  <!ENTITY dhemail     "<email>[EMAIL PROTECTED]</email>">
   <!ENTITY dhusername  "Eduard Bloch">
   <!ENTITY dhucpackage "<refentrytitle>PPPOECONF</refentrytitle>">
   <!ENTITY dhpackage   "pppoeconf">

Attachment: signature.asc
Description: Digital signature

Reply via email to