lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 4 May 2020 08:38:33 +0100
From:   Jonny Grant <jg@...k.org>
To:     "Theodore Y. Ts'o" <tytso@....edu>
Cc:     linux-ext4@...r.kernel.org
Subject: Re: /fs/ext4/namei.c ext4_find_dest_de()



On 04/05/2020 02:51, Theodore Y. Ts'o wrote:
> On Sun, May 03, 2020 at 02:00:25PM +0100, Jonny Grant wrote:
>> Hi
>>
>> I noticed that mkdir() returns EEXIST if a directory already exists.
>> strerror(EEXIST) text is "File exists"
>>
>> Can ext4_find_dest_de() be amended to return EISDIR if a directory already
>> exists? This will make the error message clearer.
> 
> No; this will confuse potentially a large number of existing programs.
> Also, the current behavior is required by POSIx and the Single Unix
> Specification standards.
> 
> 	https://pubs.opengroup.org/onlinepubs/009695399/
> 
> Regards,
> 
> 						- Ted

Hi,

Is it likely POSIX would introduce this change? It's a shame we're still 
constrained by old standards (SVr4, BSD), but it's fine if they can be 
updated.

As  developer, I can see it feels more confusing for users as it is. 
This issue shows up in various programs.

$ mkdir test
$ mkdir test
mkdir: cannot create directory ‘test’: File exists


I would expect it to be clear for users:

$ mkdir test
$ mkdir test
mkdir: cannot create directory ‘test’: Is a directory


The 'mkdir' team don't want to add a call to stat() to give a more 
appropriate error message.

Cheers, Jonny

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ