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

Caspar Clemens Mierau damokles at ubuntu.com
Tue Jun 17 14:08:18 EDT 2008


Hi,

On Tue, Jun 17, 2008 at 11:49:01AM -0400, Ian Goldberg wrote:
> Thanks!  My only concern is what happens when you try to build the
> Windows version of pidgin-otr with this patch.  I suppose we could wrap
> it in a HAVE_UMASK or something?  My Win32 cross-compilation environment
> isn't with me right now, but I'll check it later on.

actually I think, the glib stuff is quite Win32 safe. See:
http://library.gnome.org/devel/glib/stable/glib-File-Utilities.html

"g_chmod()

A wrapper for the POSIX chmod() function. The chmod() function is used
to set the permissions of a file system object. Note that on Windows the
file protection mechanism is not at all POSIX-like, and the underlying
chmod() function in the C library just sets or clears the READONLY
attribute. It does not touch any ACL. Software that needs to manage file
permissions on Windows exactly should use the Win32 API."

So according to the official documentation, using g_chmod under Win32
won't crash. It only seems to set a readonly flag when removing too much
"w" flags.

Actually I even think that you are already fine using g_fopen under
Win32, but somebody needs to confirm this.

Best,

Caspar Clemens Mierau



-- 
Caspar Clemens Mierau
 Dipl.-Kult. (Medien)
 official "Ubuntu member"
 ubuntu Deutschland e.V.
 Ubuntu Berlin
 c-base e.V.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20080617/55cb0b1c/attachment.pgp>


More information about the OTR-dev mailing list