Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 174512
Collapse All | Expand All

(-)clamd.rc (-1 / +2 lines)
Lines 127-139 logfix() { Link Here
127
	if [ "${START_FRESHCLAM}" = "yes" ]; then
127
	if [ "${START_FRESHCLAM}" = "yes" ]; then
128
		# fix freshclam log permissions
128
		# fix freshclam log permissions
129
		# (might be clobbered by logrotate or something)
129
		# (might be clobbered by logrotate or something)
130
		logfile=`awk '$1 == "UpdateLogFile" { print $2 }' /etc/freshclam.conf`
130
		logfile=`awk '$1 == "UpdateLogFile" { print $2 }' /etc/freshclam.conf`
131
		local freshclam_user=`awk '$1 == "DatabaseOwner" { print $2 }' /etc/freshclam.conf`
131
		if [ -n "${logfile}" -a -n "${clamav_user}" ]; then
132
		if [ -n "${logfile}" -a -n "${clamav_user}" ]; then
132
			if [ ! -f "${logfile}" ]; then
133
			if [ ! -f "${logfile}" ]; then
133
				touch ${logfile}
134
				touch ${logfile}
134
			fi	
135
			fi	
135
			chown ${clamav_user} ${logfile}
136
			chown ${freshclam_user} ${logfile}
136
			chmod 640 ${logfile}
137
			chmod 640 ${logfile}
137
		fi
138
		fi
138
	fi
139
	fi
139
}
140
}

Return to bug 174512