[Mimedefang] MIMEDefang 2.73-BETA-2 is available
Philip Prindeville
philipp_subx at redfish-solutions.com
Fri Jan 20 01:11:09 EST 2012
On 1/19/12 6:49 PM, David F. Skoll wrote:
> Right now, you can work around it by putting:
>
> umask(007);
>
> near the top of your mimedefang-filter file, outside any subroutine definition.
If we do that, then the -G flag will be in force in mimedefang-filter whether it's specified or not.
Here's a patch I'm proposing: have activateSlave() change its umask() after the fork() and before the exec().
-Philip
-------------- next part --------------
--- mimedefang-2.73-BETA-2/mimedefang-multiplexor.c.orig 2011-12-21 12:35:56.000000000 -0700
+++ mimedefang-2.73-BETA-2/mimedefang-multiplexor.c 2012-01-19 18:55:38.415153722 -0700
@@ -207,6 +207,8 @@ static HistoryBucket hourly_history[NUM_
/* Pipe written on reception of SIGCHLD */
static int Pipe[2] = {-1, -1};
+static mode_t my_umask = 077;
+
#ifndef HAVE_SIG_ATOMIC_T
#define sig_atomic_t int
#endif
@@ -553,8 +555,6 @@ main(int argc, char *argv[], char **env)
char *options;
int facility = LOG_MAIL;
- mode_t my_umask = 077;
-
EventSelector *es;
struct sigaction act;
struct timeval t;
@@ -2549,6 +2549,9 @@ activateSlave(Slave *s, char const *reas
pname = Settings.progPath;
}
+ /* pass umask (less group write) to child */
+ umask(my_umask | 020);
+
#ifdef EMBED_PERL
if (Settings.useEmbeddedPerl) {
run_embedded_filter();
More information about the MIMEDefang
mailing list