ports/144639: [PATCH] security/clamav-unofficial-sigs
Andrei Lavreniyuk
andy.lavr at gmail.com
Wed Mar 10 21:50:02 UTC 2010
>Number: 144639
>Category: ports
>Synopsis: [PATCH] security/clamav-unofficial-sigs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 10 21:50:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Andrei Lavreniyuk
>Release: FreeBSD 8.0-STABLE
>Organization:
Technica-03, Inc.
>Environment:
FreeBSD datacenter.technica-03.local 8.0-STABLE FreeBSD 8.0-STABLE #0: Mon Feb 22 09:39:03 EET 2010 root at datacenter.technica-03.local:/usr/obj/usr/src/sys/SMP64 amd64
>Description:
Testing updated MalwarePatrol database file: mbl.ndb
Clamscan reports Sanesecurity mbl.ndb database integrity tested good
default_perms_for_dir: sys_acl_get_file(., ACL_TYPE_DEFAULT): Invalid argument, falling back on umask
default_perms_for_dir: sys_acl_get_file(., ACL_TYPE_DEFAULT): Invalid argument, falling back on umask
Successfully updated MalwarePatrol production database file: mbl.ndb
>How-To-Repeat:
# /usr/local/bin/clamav-unofficial-sigs.sh -c /usr/local/etc/clamav-unofficial-sigs.conf
>Fix:
Patch attached with submission follows:
--- clamav-unofficial-sigs.sh.bak 2010-03-10 23:13:29.000000000 +0200
+++ clamav-unofficial-sigs.sh 2010-03-10 23:39:49.000000000 +0200
@@ -124,7 +124,7 @@
echo "$file_sig" | tr -d "\r" >> "$config_dir/monitor-ign.txt"
if clamscan --quiet -d "$config_dir/local.ign" "$config_dir/scan-test.txt"
then
- if rsync -cqt $config_dir/local.ign $clam_dbs
+ if rsync -pcqt $config_dir/local.ign $clam_dbs
then
perms chown $clam_user:$clam_group local.ign
chmod 0644 local.ign "$config_dir/monitor-ign.txt"
@@ -257,7 +257,7 @@
echo "*** RSYNC LOCATION & VERSION ***"
rsync=`which rsync`
echo "$rsync"
- $rsync --version | head -1
+ $rsync -p-version | head -1
echo ""
echo "*** CURL LOCATION & VERSION ***"
curl=`which curl`
@@ -379,7 +379,7 @@
then
if ! cmp -s "$path_file" "$clam_dbs/$db_file"
then
- if rsync -cqt "$path_file" "$clam_dbs"
+ if rsync -pcqt "$path_file" "$clam_dbs"
then
perms chown $clam_user:$clam_group "$clam_dbs/$db_file"
chmod 0644 "$clam_dbs/$db_file"
@@ -577,7 +577,7 @@
grep -h -v -f "$config_dir/whitelist.hex" "$db_file" > "$db_file-tmp"
mv -f "$db_file-tmp" "$db_file"
if clamscan --quiet -d "$db_file" "$config_dir/scan-test.txt" 2>/dev/null ; then
- if rsync -cqt $db_file $clam_dbs ; then
+ if rsync -pcqt $db_file $clam_dbs ; then
perms chown $clam_user:$clam_group $clam_dbs/$db_file
do_clamd_reload=1
fi
@@ -797,12 +797,12 @@
fi
# If the local rsync client supports the '--no-motd' flag, then enable it.
-if rsync --help | grep 'no-motd' > /dev/null ; then
+if rsync -help | grep 'no-motd' > /dev/null ; then
no_motd="--no-motd"
fi
# If the local rsync client supports the '--contimeout' flag, then enable it.
-if rsync --help | grep 'contimeout' > /dev/null ; then
+if rsync -help | grep 'contimeout' > /dev/null ; then
contimeout="--contimeout=30"
fi
@@ -998,7 +998,7 @@
log "WARNING - Clamscan reports Sanesecurity $db_file database integrity tested BAD - SKIPPING" ; false
fi && \
(test "$keep_db_backup" = "yes" && cp -f $clam_dbs/$db_file $clam_dbs/$db_file-bak 2>/dev/null ; true) && \
- if rsync -cqt $ss_dir/$db_file $clam_dbs
+ if rsync -pcqt $ss_dir/$db_file $clam_dbs
then
perms chown $clam_user:$clam_group $clam_dbs/$db_file
comment "Successfully updated Sanesecurity production database file: $db_file"
@@ -1026,7 +1026,7 @@
log "WARNING - Clamscan reports Sanesecurity $db_file database integrity tested BAD - SKIPPING" ; false
fi && \
(test "$keep_db_backup" = "yes" && cp -f $clam_dbs/$db_file $clam_dbs/$db_file-bak 2>/dev/null ; true) && \
- if rsync -cqt $test_dir/$db_file $clam_dbs
+ if rsync -pcqt $test_dir/$db_file $clam_dbs
then
perms chown $clam_user:$clam_group $clam_dbs/$db_file
comment "Successfully updated Sanesecurity production database file: $db_file"
@@ -1124,7 +1124,7 @@
log "WARNING - Clamscan reports Sanesecurity $db_file database integrity tested BAD - SKIPPING" ; false
fi && \
(test "$keep_db_backup" = "yes" && cp -f $clam_dbs/$db_file $clam_dbs/$db_file-bak 2>/dev/null ; true) && \
- if rsync -cqt $si_dir/$db_file $clam_dbs
+ if rsync -pcqt $si_dir/$db_file $clam_dbs
then
perms chown $clam_user:$clam_group $clam_dbs/$db_file
comment "Successfully updated SecuriteInfo production database file: $db_file"
@@ -1153,7 +1153,7 @@
log "WARNING - Clamscan reports Sanesecurity $db_file database integrity tested BAD - SKIPPING" ; false
fi && \
(test "$keep_db_backup" = "yes" && cp -f $clam_dbs/$db_file $clam_dbs/$db_file-bak 2>/dev/null ; true) && \
- if rsync -cqt $test_dir/$db_file $clam_dbs
+ if rsync -pcqt $test_dir/$db_file $clam_dbs
then
perms chown $clam_user:$clam_group $clam_dbs/$db_file
comment "Successfully updated SecuriteInfo production database file: $db_file"
@@ -1245,7 +1245,7 @@
log "WARNING - Clamscan reports Sanesecurity $db_file database integrity tested BAD - SKIPPING" ; false
fi && \
(test "$keep_db_backup" = "yes" && cp -f $clam_dbs/$db_file $clam_dbs/$db_file-bak 2>/dev/null ; true) && \
- if rsync -cqt $mbl_dir/$db_file $clam_dbs
+ if rsync -pcqt $mbl_dir/$db_file $clam_dbs
then
perms chown $clam_user:$clam_group $clam_dbs/$db_file
comment "Successfully updated MalwarePatrol production database file: $db_file"
@@ -1273,7 +1273,7 @@
log "WARNING - Clamscan reports Sanesecurity $db_file database integrity tested BAD - SKIPPING" ; false
fi && \
(test "$keep_db_backup" = "yes" && cp -f $clam_dbs/$db_file $clam_dbs/$db_file-bak 2>/dev/null ; true) && \
- if rsync -cqt $test_dir/$db_file $clam_dbs
+ if rsync -pcqt $test_dir/$db_file $clam_dbs
then
perms chown $clam_user:$clam_group $clam_dbs/$db_file
comment "Successfully updated MalwarePatrol production database file: $db_file"
@@ -1358,7 +1358,7 @@
log "WARNING - Clamscan reports $db_file database integrity tested BAD - SKIPPING" ; false
fi && \
(test "$keep_db_backup" = "yes" && cp -f $clam_dbs/$db_file $clam_dbs/$db_file-bak 2>/dev/null ; true) && \
- if rsync -cqt $add_dir/$db_file $clam_dbs
+ if rsync -pcqt $add_dir/$db_file $clam_dbs
then
perms chown $clam_user:$clam_group $clam_dbs/$db_file
comment "Successfully updated User-Added production database file: $db_file"
@@ -1420,7 +1420,7 @@
if [ "$ign_updated" = "1" ] ; then
if clamscan --quiet -d "$config_dir/local.ign" "$config_dir/scan-test.txt"
then
- if rsync -cqt $config_dir/local.ign $clam_dbs
+ if rsync -pcqt $config_dir/local.ign $clam_dbs
then
perms chown $clam_user:$clam_group "$clam_dbs/local.ign"
chmod 0644 "$clam_dbs/local.ign" "$config_dir/monitor-ign.txt"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list