[Pkg-clamav-devel] Bug#553333: Bug#553333: clamav-milter: inet milter socket configuration changes the owner of /root to clamav

Teodor mteodor at gmail.com
Sat Oct 31 11:00:10 UTC 2009


Hi,

On Fri, Oct 30, 2009 at 10:12 PM, Stephen Gran <sgran at debian.org> wrote:
> Hi there,
>
> I understand how:
>
>> @@ -279,5 +279,5 @@ fi
>>
>>  make_dir "$DataBaseDirectory"
>> -if [ "${SOCKET_PATH#inet}" = "${SOCKET_PATH}" ]; then
>> +if [ "${SOCKET_TYPE}" = "local" ]; then
>>    make_dir $(dirname "$SOCKET_PATH")
>>    chown $User $(dirname "$SOCKET_PATH")
>
> could be a problem (maybe - if the variable $SOCKET_PATH includes the
> string 'inet' but somehow the variable $SOCKET_PATH remains unset), but

Agree, this is the only mandatory part for fixing the reported
problem. Maybe a better test case is this:
  "${SOCKET_TYPE}" != "inet"

if the variable ${SOCKET_TYPE} could remain empty for local/unix sockets.

> I don't see how:
>
>> @@ -172,5 +172,5 @@ make_dir()
>>    [ -n "$User" ] || User=clamav
>>    mkdir -p -m 0755 "$DIR"
>> -  chown "$User:$User" "$DIR"
>> +  chown "$User" "$DIR"
>>  }
>
> Cause any problems or indeed makes any difference?

I've just mentioned this because the assumption to have the same group
name as the user name is wrong. Is someone decides to use another user
name than 'clamav' it could have a different group name. Also, this is
the only part where $Group is mentioned but not for sure a variable in
CLAMAVCONF otherwise it should have been initialized just like $User.

Thanks





More information about the Pkg-clamav-devel mailing list