The attached version: - changes mkdir/chmod for an install in MESSAGE - adds notes about permissions on /dev/pf - calls setgid(), so /dev/pf only needs 640 not 644 (the code already assumes that username == groupname so I didn't add a new config parameter)
Remaining problems:
- permissions on /dev/pf should only be needed for transparent
mode (currently connections fail without read access to it)
- I am not too happy about this lot:
char comm[4096];
snprintf(comm,4096,"%s %s %s",MOVEIT,p->mailfile,config->virusdirbase);
if(system(comm)) do_log(LOG_CRIT,"ERR: move");
snprintf(comm,4096,"%s %s/p3scan.*",CHMODCMD,config->virusdirbase);
do_log(LOG_DEBUG,"Forcing all files 0600 %s",comm);
if(system(comm)) do_log(LOG_CRIT,"ERR: chmod");
snprintf(comm,4096,"cat %s | %s -s '[Virus] found in a mail to %s'
%s", mailx, config->mail, paramlist_get(p->params, "%USERNAME%"),config->extra);
if(system(comm)) do_log(LOG_CRIT,"ERR: mailx");
snprintf(comm,4096,"cat %s | %s -s '[Virus] found in a mail to %s'
%s", mail, config->mail, paramlist_get(p->params, "%USERNAME%"),config->extra);
if(system(comm)) do_log(LOG_CRIT,"ERR mail");
p3scan.tgz
Description: application/tar-gz
