Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44312 - clamd init script incorrectly tests for socket existance
Summary: clamd init script incorrectly tests for socket existance
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
: 61635 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-03-10 19:30 UTC by Jeremy Huddleston (RETIRED)
Modified: 2004-09-03 14:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix the bug (clamd.diff,422 bytes, patch)
2004-03-23 05:17 UTC, Sybren Stüvel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Huddleston (RETIRED) gentoo-dev 2004-03-10 19:30:05 UTC
start() {
        if [ "${START_CLAMD}" = "yes" ]; then
                if [ -f "/tmp/clamd" ]; then
                        rm -f /tmp/clamd
                fi

... should be ...

start() {
        if [ "${START_CLAMD}" = "yes" ]; then
                if [ -S "/tmp/clamd" ]; then
                        rm -f /tmp/clamd
                fi

-f returns false if the item is a socket (which /tmp/clamd is).  You want to use -S
Comment 1 Sybren Stüvel 2004-03-23 05:17:19 UTC
Created attachment 27847 [details, diff]
Patch to fix the bug

This patch fixes the bug. It checks for the existance of /tmp/clamd, without
the requirement that it's a regular file.
Comment 2 Daniel Black (RETIRED) gentoo-dev 2004-07-24 17:17:32 UTC
This has been fixed although I think it has problems see bug #56805
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-07-25 14:04:57 UTC
markign fixed.
Comment 4 Andrej Kacian (RETIRED) gentoo-dev 2004-09-03 14:54:38 UTC
*** Bug 61635 has been marked as a duplicate of this bug. ***