clamav/clamav-0.95rc1-umask.patch
2009-03-08 13:24:07 +00:00

40 lines
1.4 KiB
Diff

Index: clamav-0.95rc1/clamav-milter/clamav-milter.c
===================================================================
--- clamav-0.95rc1.orig/clamav-milter/clamav-milter.c
+++ clamav-0.95rc1/clamav-milter/clamav-milter.c
@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
if((opt = optget(opts, "PidFile"))->enabled) {
FILE *fd;
- mode_t old_umask = umask(0006);
+ mode_t old_umask = umask(0022);
if((fd = fopen(opt->strarg, "w")) == NULL) {
logg("!Can't save PID in file %s\n", opt->strarg);
Index: clamav-0.95rc1/shared/output.c
===================================================================
--- clamav-0.95rc1.orig/shared/output.c
+++ clamav-0.95rc1/shared/output.c
@@ -250,7 +250,7 @@ int logg(const char *str, ...)
#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
Index: clamav-0.95rc1/freshclam/freshclam.c
===================================================================
--- clamav-0.95rc1.orig/freshclam/freshclam.c
+++ clamav-0.95rc1/freshclam/freshclam.c
@@ -102,7 +102,7 @@ static void writepid(const char *pidfile
{
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 {