Hello,

I recently ran into this bug when updating an elderly relative's notebook
from Woody to Sarge. In contrast to me, she's using kppp for dialin; I had
added a "call" option to kppp's settings to insert a "noauth". This failed
after the update with a message that pppd hat died. (Incidentally this
implies that this bug prevents using kppp with default option settings.)

The behaviour can be reproduced with the following file "test.pppd" and
the Debian package pppd 2.4.3-20050321:

  # Test file to reproduce Debian bug #308136 (SEGV in pppd 2.4.3) with:
  #   /usr/sbin/pppd file test.pppd /dev/null
  dryrun
  # As arguments to "call", choose any two files names for which files
  # exist in /etc/ppp/peers:
  call kppp-options
  call kppp-options

On my system, "kppp-options" is the default as installed by kppp 3.3.2-5.
It contains one line, "#noauth".

The reason for the problem is a call to update_db_entry() in main.c,
function script_setenv(), line 1854 in the upstream source (ppp 2.4.3):

    #ifdef USE_TDB
                    if (iskey && pppdb != NULL)
                        add_db_key(newstring);
                    update_db_entry();
    #endif

The function update_db_entry() may only be called if pppdb is not NULL;
unfortunately in this situation it is. Other calls to update_db_entry()
are protected against this, see, e.g., the end of script_setenv().
(In my opinion, a better design decision would have been to insert an
appropriate check for pppdb in update_db_entry().)

I have not taken the trouble to check the logic, but modifying the
code above to read

    #ifdef USE_TDB
                    if (pppdb != NULL) {
                        if (iskey)
                            add_db_key(newstring);
                        update_db_entry();
                    }
    #endif

fixes the problem in my environment.

Regards,
Martin Lottermoser
-- 
Martin Lottermoser                 Martin.Lottermoser at t-online.de
Greifswaldstrasse 28
38124 Braunschweig                 Telephone: +49 (531) 6802747
Germany


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to