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] [day] [month] [year] [list]
Message-ID: <20070323234516.GH5967@schatzie.adilger.int>
Date:	Fri, 23 Mar 2007 17:45:16 -0600
From:	Andreas Dilger <adilger@...sterfs.com>
To:	Timo Sirainen <tss@....fi>
Cc:	Guillaume Chazarain <guichaz@...oo.fr>, linux-ext4@...r.kernel.org
Subject: Re: 2.6.20 ext3 rename() returns success but doesn't unlink the source

On Mar 24, 2007  01:18 +0200, Timo Sirainen wrote:
> On Fri, 2007-03-23 at 23:24 +0100, Guillaume Chazarain wrote:
> > Timo Sirainen a écrit :
> > 
> > > 	rename("/mnt/Maildir/.Trash/new/1174635781.P25986Q0M341350.hurina",
> > > 	       "/mnt/Maildir/.Trash/cur/1174635781.P25986Q0M341350.hurina:2,");
> > 
> > $ ls -li /mnt/Maildir/.Trash/new/1174635781.P25986Q0M341350.hurina /mnt/Maildir/.Trash/cur/1174635781.P25986Q0M341350.hurina:2,
> > 122481 -rw------- 2 1000 1000 3091 Mar 23 08:43 /mnt/Maildir/.Trash/cur/1174635781.P25986Q0M341350.hurina:2,
> > 122481 -rw------- 2 1000 1000 3091 Mar 23 08:43 /mnt/Maildir/.Trash/new/1174635781.P25986Q0M341350.hurina
> > 
> > All your files in the list are hard linked.
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=fs/namei.c;h=ee60cc4d3453209723d6f70982e7083d7cb39477;hb=HEAD#l2447
> > seems to handle your case as you see it:
> > if (old_dentry->d_inode == new_dentry->d_inode)
> > 	return 0;
> 
> Hmm. Oh. So this is this intentional? First I ever heard of it, and also
> goes against my logic. I'll go complain to man pages people then. This
> will make my error handling difficult..

Yes, it is a very counter-intuitive requirement in the POSIX spec.  The
GNU user tools do what is expected (unlink the source file).

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ