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

Caspar Clemens Mierau damokles@ubuntu.com
Tue, 17 Jun 2008 20:08:18 +0200


--EY/WZ/HvNxOox07X
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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



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


--EY/WZ/HvNxOox07X
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIV/2SdbVIHJiaHn8RArAVAJ9f+VI0e+hgodK/vrpz74bAgA4C8gCfQ6Us
qQ0Vz7aRkz2qtdFf4JhSKno=
=bcw5
-----END PGP SIGNATURE-----

--EY/WZ/HvNxOox07X--