]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commit
CA-28788: fix the 'atomic_write_to_file' function which always ended up setting the...
authorDavid Scott <david.scott@xensource.com>
Fri, 2 Oct 2009 17:22:52 +0000 (18:22 +0100)
committerDavid Scott <david.scott@xensource.com>
Fri, 2 Oct 2009 17:22:52 +0000 (18:22 +0100)
commita7d310583e449225ff6a96d437ec4fc247192c43
treece3920670f8a8a4598fcac834b250b9f4004f168
parentec01cb3519630140e70c372f7aa52c3c864352a8
CA-28788: fix the 'atomic_write_to_file' function which always ended up setting the perms to 0o0 despite the face that it tries to set them to 0o644.

As AndyP points out, the 'temp_file_in_dir' function creates the file with 0o0 and Unix.open only uses the given permissions if it actually creates a file. Therefore we add a Unix.chmod to set the permissions we want.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
stdext/unixext.ml
stdext/unixext.mli