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]
Message-ID: <4CEF9E68.9080200@draigBrady.com>
Date:	Fri, 26 Nov 2010 11:47:52 +0000
From:	Pádraig Brady <P@...igBrady.com>
To:	"Frank A. Kingswood" <frank@...gswood-consulting.co.uk>
CC:	linux-kernel@...r.kernel.org
Subject: Re: atomically swap two files

On 25/11/10 20:11, Frank A. Kingswood wrote:
> Hi!
> 
> Is it possible to swap two files in an atomic way, so that after the
> syscall either the two files have exchanged names or neither has been
> modified?
> 
> I suspect that btrfs could do it, but I'm wondering about ext3/4.

I don't think there is anything equivalent to exchangedata() on Linux
http://developer.apple.com/library/mac/#DOCUMENTATION/Darwin/Reference/ManPages/man2/exchangedata.2.html

I've written some notes on atomically replacing
file contents with standard tools here:
http://www.pixelbeat.org/docs/unix_file_replacement.html

cheers,
Pádraig.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ