Re: g_file_write()

Tor Lillqvist <tml iki fi> writes:

> Soeren Sandmann writes:
>  > The patch does use fchmod(). Are there systems we care about where
>  > fchmod() is not available?
> Win32... No such thing in the C library. As far as I know, there isn't
> even anything in the underlying Win32 API that would enable setting
> the permissions for a file based just on a handle to an open file.
> However, one can achieve much the same effect by opening the file
> using a restrictive "share mode" (read enforced locking), so that
> nobody else can open it. Isn't that what was intended here?
> Anyway, I doubt even that really is necessary. The kind of
> applications that use GLib on Windows aren't security sensitive.
> There is no setuid mechanism. The security threats on Windows are of a
> different variety, I doubt there is much "market" for the Unix kind of
> race condition games.

Yeah, I agree, the whole function just returns TRUE on Windows.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]