Bug#300175: Patch for clamav/clamsmtp

2005-03-21 Thread Samuel Tardieu
On recent glibc, files created with mkstemp() are created with mode
0600. If the mode is not changed, there is no way for another user to
read the temporary file, regardless of the users' respective groups.

This patch allows users in the same group to read the temporary files.
This should solve Erwan's problem, and certainly has solved mine:

--- common/smtppass.c.old   2005-01-27 01:22:56.0 +0100
+++ common/smtppass.c   2005-03-21 10:58:38.0 +0100
@@ -1270,6 +1270,7 @@
 return -1;
 }
 
+fchmod(tfd, 0640);
 fcntl(tfd, F_SETFD, fcntl(tfd, F_GETFD, 0) | FD_CLOEXEC);
 sp_messagex(ctx, LOG_DEBUG, created cache file: %s, ctx-cachename);
 }

  Sam

PS/ older glibc used to create the file in 0666 mode, which may explain
why not everyone has this problem
-- 
Samuel Tardieu -- [EMAIL PROTECTED] -- http://www.rfc1149.net/sam




Bug#300175: Patch for clamav/clamsmtp

2005-03-21 Thread Chad Walstrom
On Mon, Mar 21, 2005 at 11:07:48AM +0100, Samuel Tardieu wrote:
 This patch allows users in the same group to read the temporary files.
 This should solve Erwan's problem, and certainly has solved mine:

I'll test and apply this patch to the package and upload tonight after
work, but it looks sound.  I've also added the start/stop routine for
clamav-daemon in preinst/postrm.  I'll probably upload with a medium or
high priority.

-- 
Chad Walstrom [EMAIL PROTECTED]   http://www.wookimus.net/
   assert(expired(knowledge)); /* core dump */


signature.asc
Description: Digital signature