2010-06-01 19:22:07 +00:00
|
|
|
Index: clamav-0.96.1/clamav-milter/clamav-milter.c
|
2009-03-08 13:24:07 +00:00
|
|
|
===================================================================
|
2010-06-01 19:22:07 +00:00
|
|
|
--- clamav-0.96.1.orig/clamav-milter/clamav-milter.c
|
|
|
|
+++ clamav-0.96.1/clamav-milter/clamav-milter.c
|
|
|
|
@@ -365,7 +365,7 @@ int main(int argc, char **argv) {
|
2009-03-08 13:24:07 +00:00
|
|
|
|
|
|
|
if((opt = optget(opts, "PidFile"))->enabled) {
|
|
|
|
FILE *fd;
|
2009-10-29 09:03:06 +00:00
|
|
|
- mode_t old_umask = umask(0002);
|
2009-03-08 13:24:07 +00:00
|
|
|
+ mode_t old_umask = umask(0022);
|
|
|
|
|
|
|
|
if((fd = fopen(opt->strarg, "w")) == NULL) {
|
|
|
|
logg("!Can't save PID in file %s\n", opt->strarg);
|
2010-06-01 19:22:07 +00:00
|
|
|
Index: clamav-0.96.1/shared/output.c
|
2009-03-08 13:24:07 +00:00
|
|
|
===================================================================
|
2010-06-01 19:22:07 +00:00
|
|
|
--- clamav-0.96.1.orig/shared/output.c
|
|
|
|
+++ clamav-0.96.1/shared/output.c
|
|
|
|
@@ -280,7 +280,7 @@ int logg(const char *str, ...)
|
2009-03-08 13:24:07 +00:00
|
|
|
#endif
|
|
|
|
if(logg_file) {
|
|
|
|
if(!logg_fp) {
|
|
|
|
- old_umask = umask(0037);
|
|
|
|
+ old_umask = umask(0077);
|
|
|
|
if((logg_fp = fopen(logg_file, "at")) == NULL) {
|
|
|
|
umask(old_umask);
|
|
|
|
#ifdef CL_THREAD_SAFE
|
2010-06-01 19:22:07 +00:00
|
|
|
Index: clamav-0.96.1/freshclam/freshclam.c
|
2009-03-08 13:24:07 +00:00
|
|
|
===================================================================
|
2010-06-01 19:22:07 +00:00
|
|
|
--- clamav-0.96.1.orig/freshclam/freshclam.c
|
|
|
|
+++ clamav-0.96.1/freshclam/freshclam.c
|
|
|
|
@@ -106,7 +106,7 @@ static void writepid(const char *pidfile
|
2009-03-08 13:24:07 +00:00
|
|
|
{
|
|
|
|
FILE *fd;
|
|
|
|
int old_umask;
|
|
|
|
- old_umask = umask(0006);
|
|
|
|
+ old_umask = umask(0022);
|
|
|
|
if((fd = fopen(pidfile, "w")) == NULL) {
|
|
|
|
logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno));
|
|
|
|
} else {
|