[OTR-dev] pidgin-otr: mode 600 instead of 644

Ian Goldberg ian at cypherpunks.ca
Tue Jun 17 17:27:06 EDT 2008

On Tue, Jun 17, 2008 at 11:17:14PM +0200, Caspar Clemens Mierau wrote:
> > > Actually I even think that you are already fine using g_fopen under
> > > Win32, but somebody needs to confirm this.
> > 
> > But there's no equivalent for umask, right?
> Right. On Windows there is POSIX umask equivalent. There only exists a
> readonly flag which poorly acts like a 444 mode. Glib therefore mostly
> seems to ignore umask calls and only tries to set "readonly" when it
> seems equivalent to the current umask.
> If we want to be totally safe, we should check the platform and don't
> call the umask when on Win32. Otherwise trusting glib documentation
> actually prevents us from writing more code than actually necessary.

But the platform is determined at compile time.  So I think I'll just
apply your patch, but with the new umask lines wrapped in:


#endif  /* HAVE_UMASK */

   - Ian

More information about the OTR-dev mailing list