Your message dated Mon, 01 Feb 2010 16:53:44 +0000
with message-id <[email protected]>
and subject line Bug#562627: fixed in lua-filesystem 1.4.2-3
has caused the Debian Bug report #562627,
regarding liblua5.1-filesystem0: lfs.mkdir sets umask to 000 in case of error
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
562627: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=562627
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: liblua5.1-filesystem0
Version: 1.4.1-1
Severity: normal

Hi!

Appears that lfs.mkdir sets umask to 0 before creating directory (it
explicitly sets permissions to 775 regardless any umask value), but it doesn't
reset it back if creating directory fails.

Below I cite src/lfs.c:

========================================================================
static int make_dir (lua_State *L) {
        const char *path = luaL_checkstring (L, 1);
        int fail;
#ifdef _WIN32
        int oldmask = umask (0);
        fail = _mkdir (path);
#else
        mode_t oldmask = umask( (mode_t)0 );
        fail =  mkdir (path, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP |
                             S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH );
#endif
        if (fail) {
                lua_pushnil (L);
        lua_pushfstring (L, "%s", strerror(errno));
                return 2;
        }
        umask (oldmask);
        lua_pushboolean (L, 1);
        return 1;
}
========================================================================

Note 'umask (oldmask)' isn't reached if fail is true. The pretty obvious
solution is to move 'umask (oldmask)' before 'if (fail)', but I wonder why
lfs.mkdir doesn't respect umask at all? May be it'd be better to remove all
calls to umask?

BTW, this bug is present in 1.4.2-2 from sid also, and affects prosody (see bug
#561704).

-- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=ru_RU.CP1251, LC_CTYPE=ru_RU.CP1251 (charmap=CP1251)
Shell: /bin/sh linked to /bin/bash

Versions of packages liblua5.1-filesystem0 depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries

liblua5.1-filesystem0 recommends no packages.

liblua5.1-filesystem0 suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Source: lua-filesystem
Source-Version: 1.4.2-3

We believe that the bug you reported is fixed in the latest version of
lua-filesystem, which is due to be installed in the Debian FTP archive:

liblua5.1-filesystem-dev_1.4.2-3_amd64.deb
  to main/l/lua-filesystem/liblua5.1-filesystem-dev_1.4.2-3_amd64.deb
liblua5.1-filesystem0_1.4.2-3_amd64.deb
  to main/l/lua-filesystem/liblua5.1-filesystem0_1.4.2-3_amd64.deb
lua-filesystem_1.4.2-3.diff.gz
  to main/l/lua-filesystem/lua-filesystem_1.4.2-3.diff.gz
lua-filesystem_1.4.2-3.dsc
  to main/l/lua-filesystem/lua-filesystem_1.4.2-3.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Enrico Tassi <[email protected]> (supplier of updated lua-filesystem 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 01 Feb 2010 17:09:15 +0100
Source: lua-filesystem
Binary: liblua5.1-filesystem0 liblua5.1-filesystem-dev
Architecture: source amd64
Version: 1.4.2-3
Distribution: unstable
Urgency: low
Maintainer: Enrico Tassi <[email protected]>
Changed-By: Enrico Tassi <[email protected]>
Description: 
 liblua5.1-filesystem-dev - luafilesystem development files for the Lua 
language version 5.1
 liblua5.1-filesystem0 - luafilesystem library for the Lua language version 5.1
Closes: 562627
Changes: 
 lua-filesystem (1.4.2-3) unstable; urgency=low
 .
   * added umask.dpatch, taken from the upstream (Closes: #562627)
   * removed unused patches
Checksums-Sha1: 
 56bbfb3777ae179302d1cee8cb949d728c13b8ea 1278 lua-filesystem_1.4.2-3.dsc
 500c336f87a0f6944e20918e60f8122937f087e1 3137 lua-filesystem_1.4.2-3.diff.gz
 75acd30995e28cfcf18bcae61fa5c61f24b5e1b1 9666 
liblua5.1-filesystem0_1.4.2-3_amd64.deb
 84d450d246ba0b6e8a5dc05d91b99c0c935577a8 23926 
liblua5.1-filesystem-dev_1.4.2-3_amd64.deb
Checksums-Sha256: 
 202704a030d27d2152a31ebdbb8ae5f977b130d2f02adc369f787b6d53a5c402 1278 
lua-filesystem_1.4.2-3.dsc
 be83b92218cf5ccc5c01120b562e4d4c37de50e341b608a905c740d9860c653f 3137 
lua-filesystem_1.4.2-3.diff.gz
 c8ba2e682f2887e9909548b1e67b197acc9e6631069001edc69bd397af629714 9666 
liblua5.1-filesystem0_1.4.2-3_amd64.deb
 a9d68ae2c66353880e9a4d7445162e5672d321c0c93e30e25d739fd51fc420af 23926 
liblua5.1-filesystem-dev_1.4.2-3_amd64.deb
Files: 
 941e05432cd85b6f74143842a3f14ce1 1278 interpreters optional 
lua-filesystem_1.4.2-3.dsc
 6a1ab67ea21911f19373262cf7f704ff 3137 interpreters optional 
lua-filesystem_1.4.2-3.diff.gz
 2a29c990145f49e92b76d0411965a2e3 9666 interpreters optional 
liblua5.1-filesystem0_1.4.2-3_amd64.deb
 65f421d7b8bb4c6ee45123a79868ed95 23926 libdevel optional 
liblua5.1-filesystem-dev_1.4.2-3_amd64.deb

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

iEYEARECAAYFAktm/iAACgkQ7kkcPgEj8vJlKQCgqINU0XIcF4B7D/VodqpZgWZK
04gAn2AssH7MVBY3X7OCVM7Dg3Je36kE
=3lWe
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to