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  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 15:52:55 -0400
From:   "Theodore Y. Ts'o" <>
To:     Jonny Grant <>
Subject: Re: /fs/ext4/namei.c ext4_find_dest_de()

On Mon, May 04, 2020 at 08:38:33AM +0100, Jonny Grant wrote:
> > > 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.
> > 
> >
> > 
> 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.

No, because it has the potential to break existing Unix/Linux/Posix-compliant
programs.  There may very well be C programs doing the following....

	   if (mkdir(filename) < 0) {
	   	if (errno != EEXIST) {

For example, there may very well be implementations of "mkdir -p" that
do precisely this.

If we change the error returned by the mkdir system call as you
propose, it would break these innocent, unsuspecting programs.  That's
not something which will be allowed, because it falls into the
category of a Bad Thing.

Best regards,

						- Ted

Powered by blists - more mailing lists