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-next>] [day] [month] [year] [list]
Message-ID: <81A22C12505EF7419E792D791BC28B3C0104E178E598@EMAIL05.pnl.gov>
Date:	Fri, 21 Sep 2012 10:32:36 -0700
From:	"Fox, Kevin M" <kevin.fox@...l.gov>
To:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Conditional Unlink

Quick question:
Is there a syscall or some algorithm that would allow an unlink that would only happen if no writes to the file have occurred between a stat and an unlink, race free?

Background:
I'm writing a program that sync's files up to a server. I would like to unlink the files that have successfully been uploaded. There is a race though. If the file changed after uploading but before the unlink (I do not control who can write to the files), the next upload should take care of things and the unlink should fail. Otherwise, data could be lost!

Thanks,
Kevin
--
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