Re: [PATCH v2 1/2] um: Set secure access mode for temporary file

From: MickaÃl SalaÃn
Date: Sun Dec 06 2015 - 06:58:10 EST


On 06/12/2015 12:32, MickaÃl SalaÃn wrote:
> On 04/12/2015 18:13, Tristan Schmelcher wrote:
>> File permissions are checked at time of open, so I think this fchmod
>> call has never had any effect.
>
> Indeed, mmap doesn't require the file to be executable, only readable and writable. The fchmod seems to be a guarantee for this permissions but I don't see why a file newly created could not be writable.

The fchmod may be useful if the umask is 0777 :)

MickaÃl

Attachment: signature.asc
Description: OpenPGP digital signature