clamav/clamav-0.98-umask.patch

34 lines
1.2 KiB
Diff
Raw Normal View History

--- clamav-0.98/clamav-milter/clamav-milter.c 2013-09-16 21:28:14.000000000 +0200
+++ clamav-0.98/clamav-milter/clamav-milter.c.umask 2013-10-06 20:39:08.000000000 +0200
@@ -374,7 +374,7 @@
if((opt = optget(opts, "PidFile"))->enabled) {
FILE *fd;
- mode_t old_umask = umask(0002);
+ mode_t old_umask = umask(0022);
if((fd = fopen(opt->strarg, "w")) == NULL) {
logg("!Can't save PID in file %s\n", opt->strarg);
--- clamav-0.98/shared/output.c 2013-09-16 21:28:14.000000000 +0200
+++ clamav-0.98/shared/output.c.umask 2013-10-06 20:39:28.000000000 +0200
@@ -348,7 +348,7 @@
logg_open();
if(!logg_fp && logg_file) {
- old_umask = umask(0037);
+ old_umask = umask(0077);
if((logg_fp = fopen(logg_file, "at")) == NULL) {
umask(old_umask);
#ifdef CL_THREAD_SAFE
--- clamav-0.98/freshclam/freshclam.c 2013-09-16 21:28:14.000000000 +0200
+++ clamav-0.98/freshclam/freshclam.c.umask 2013-10-06 20:39:47.000000000 +0200
@@ -123,7 +123,7 @@
{
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));