From wosch@cs.tu-berlin.de  Fri Dec 27 17:29:46 1996
Received: from mail.cs.tu-berlin.de (root@mail.cs.tu-berlin.de [130.149.17.13])
          by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id RAA20965
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 27 Dec 1996 17:29:46 -0800 (PST)
Received: from campa.panke.de (anonymous214.ppp.cs.tu-berlin.de [130.149.17.214])
          by mail.cs.tu-berlin.de (8.8.4/8.8.4) with SMTP
	  id CAA05609 for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Dec 1996 02:27:32 +0100 (MET)
Received: (from wosch@localhost) by campa.panke.de (8.6.12/8.6.12) id BAA00896; Sat, 28 Dec 1996 01:41:08 +0100
Message-Id: <199612280041.BAA00896@campa.panke.de>
Date: Sat, 28 Dec 1996 01:41:08 +0100
From: Wolfram Schneider <wosch@cs.tu-berlin.de>
Reply-To: wosch@cs.tu-berlin.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: mkdir -p
X-Send-Pr-Version: 3.2

>Number:         2304
>Category:       bin
>Synopsis:       mkdir -p
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 27 17:30:01 PST 1996
>Closed-Date:    Tue Apr 1 15:46:41 PST 1997
>Last-Modified:  Tue Apr  1 15:47:02 PST 1997
>Originator:     Wolfram Schneider
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
>Environment:
>Description:

`mkdir -p dir' ignores the return value for the last
path component. 


>How-To-Repeat:

$ mkdir -p /var/mkdir/dir; echo $?
mkdir: /var/mkdir: Permission denied
1

ok, but:
$ mkdir -p /var/mkdir; echo $?
0

should be '1' and print 'Permission denied'


>Fix:

The bug exists since revision 1.2 mkdir.c 1994/09/08 author: jkh
>Release-Note:
>Audit-Trail:

From: asami@cs.berkeley.edu (Satoshi Asami)
To: FreeBSD-gnats@freefall.freebsd.org, wosch@cs.tu-berlin.de
Cc:  Subject: Re: bin/2304: mkdir -p
Date: Mon, 6 Jan 1997 21:30:46 -0800 (PST)

  * ok, but:
  * $ mkdir -p /var/mkdir; echo $?
  * 0
  * 
  * should be '1' and print 'Permission denied'
 
 Be careful here though, if we return errors for "directory already
 exists", it's going to break a lot of ports.
 
 We thought this was a "feature". ;)
 
 Satoshi
 

From: Mike Pritchard <mpp>
To: freebsd-gnats-submit
Cc:  Subject: Re: bin/2304
Date: Sat, 22 Feb 1997 21:09:20 -0800 (PST)

 > `mkdir -p dir' ignores the return value for the last
 > path component. 
 > 
 > 
 > >How-To-Repeat:
 > 
 > $ mkdir -p /var/mkdir/dir; echo $?
 > mkdir: /var/mkdir: Permission denied
 > 1
 > 
 > ok, but:
 > $ mkdir -p /var/mkdir; echo $?
 > 0
 > 
 > should be '1' and print 'Permission denied'
 > 
 > 
 > >Fix:
 > 
 > The bug exists since revision 1.2 mkdir.c 1994/09/08 author: jkh
 > >Audit-Trail:
 > 
 > From: asami@cs.berkeley.edu (Satoshi Asami)
 > To: FreeBSD-gnats@freefall.freebsd.org, wosch@cs.tu-berlin.de
 > Cc:  Subject: Re: bin/2304: mkdir -p
 > Date: Mon, 6 Jan 1997 21:30:46 -0800 (PST)
 > 
 >   * ok, but:
 >   * $ mkdir -p /var/mkdir; echo $?
 >   * 0
 >   * 
 >   * should be '1' and print 'Permission denied'
 >  
 >  Be careful here though, if we return errors for "directory already
 >  exists", it's going to break a lot of ports.
 >  
 >  We thought this was a "feature". ;)
 >  
 >  Satoshi
 
 Maybe it should only ignore the error if errno == EEXIST?
 Does POSIX or the like have anything to say on the matter?
 -- 
 Mike Pritchard
 mpp@FreeBSD.org
 "Go that way.  Really fast.  If something gets in your way, turn"
State-Changed-From-To: open->closed 
State-Changed-By: mpp 
State-Changed-When: Tue Apr 1 15:46:41 PST 1997 
State-Changed-Why:  
Fixed in rev 1.10 of mkdir.c. 
>Unformatted:


