NetBSD Problem Report #2388

From gnats  Fri May 10 10:30:24 1996
Received: from mailgate.ericsson.se by pain.lcs.mit.edu (8.7.4/8.6.12) with ESMTP id KAA22010 for <gnats-bugs@gnats.netbsd.org>; Fri, 10 May 1996 10:15:00 -0400 (EDT)
Message-Id: <199605101414.QAA27021@abro.ericsson.se>
Date: Fri, 10 May 1996 16:14:55 +0200 (MET DST)
From: Michael.Eriksson@era-t.ericsson.se (Michael Eriksson T/N)
Reply-To: Michael.Eriksson@era-t.ericsson.se
To: gnats-bugs@gnats.netbsd.org
Subject: pppd tries to unlink bad file name ("")
X-Send-Pr-Version: 3.95

>Number:         2388
>Category:       bin
>Synopsis:       pppd tries to unlink bad file name ("")
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    explorer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 10 10:35:04 +0000 1996
>Closed-Date:    Sat Aug 10 20:29:05 +0000 1996
>Last-Modified:  Sat Aug 10 20:30:55 +0000 1996
>Originator:     Michael Eriksson
>Release:        NetBSD-current 960413
>Organization:
Ericsson Radio Systems AB
>Environment:
System: NetBSD abro 1.1B NetBSD 1.1B (ABRO) #0: Wed Apr 17 13:28:58 MET DST 1996 eramer@abro:/usr/src/sys/arch/sparc/compile/ABRO sparc

>Description:

If the connect script fails, pppd tries to remove the pid file, but it
hasn't set up the filename string yet. From my log file:

May 10 15:50:07 maverick pppd[12258]: Connect script failed
May 10 15:50:08 maverick pppd[12258]: unable to delete pid file: Is a directory
May 10 15:50:08 maverick pppd[12258]: Exit.

pppd is (wrongly) using "", i.e. the current directory, as argument to
unlink(2).

>How-To-Repeat:

shell>pppd connect false

>Fix:

*** usr.sbin/pppd/main.c.orig	Fri Mar 22 13:32:20 1996
--- usr.sbin/pppd/main.c	Fri May 10 15:46:14 1996
***************
*** 503,509 ****
  	}

  	if (!demand) {
! 	    if (unlink(pidfilename) < 0 && errno != ENOENT) 
  		syslog(LOG_WARNING, "unable to delete pid file: %m");
  	    pidfilename[0] = 0;
  	}
--- 503,510 ----
  	}

  	if (!demand) {
! 	    if (pidfilename[0] != 0 &&
! 		unlink(pidfilename) < 0 && errno != ENOENT) 
  		syslog(LOG_WARNING, "unable to delete pid file: %m");
  	    pidfilename[0] = 0;
  	}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: explorer 
State-Changed-When: Sat Aug 10 16:29:05 EDT 1996 
State-Changed-Why:  
Fixed. 


Responsible-Changed-From-To: bin-bug-people->explorer 
Responsible-Changed-By: explorer 
Responsible-Changed-When: Sat Aug 10 16:29:05 EDT 1996 
Responsible-Changed-Why:  
I fixed it. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.