Skip to content
Snippets Groups Projects
Commit 181a59c2 authored by rswindell's avatar rswindell
Browse files

Fix for writing to hack.log and spam.log on Unix.

parent f337ee58
Branches
Tags
No related merge requests found
...@@ -47,7 +47,7 @@ extern "C" BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text, ...@@ -47,7 +47,7 @@ extern "C" BOOL DLLCALL hacklog(scfg_t* cfg, char* prot, char* user, char* text,
sprintf(fname,"%shack.log",cfg->data_dir); sprintf(fname,"%shack.log",cfg->data_dir);
if((file=sopen(fname,O_CREAT|O_WRONLY|O_BINARY|O_APPEND,SH_DENYWR))==-1) if((file=sopen(fname,O_CREAT|O_RDWR|O_BINARY|O_APPEND,SH_DENYWR))==-1)
return(FALSE); return(FALSE);
sprintf(hdr,"SUSPECTED %s HACK ATTEMPT from %s on %.24s\r\nUsing port %u at %s [%s]\r\nDetails: " sprintf(hdr,"SUSPECTED %s HACK ATTEMPT from %s on %.24s\r\nUsing port %u at %s [%s]\r\nDetails: "
...@@ -78,7 +78,7 @@ extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* reason, char* hos ...@@ -78,7 +78,7 @@ extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* reason, char* hos
sprintf(fname,"%sspam.log",cfg->data_dir); sprintf(fname,"%sspam.log",cfg->data_dir);
if((file=sopen(fname,O_CREAT|O_WRONLY|O_BINARY|O_APPEND,SH_DENYWR))==-1) if((file=sopen(fname,O_CREAT|O_RDWR|O_BINARY|O_APPEND,SH_DENYWR))==-1)
return(FALSE); return(FALSE);
if(to==NULL) if(to==NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment