Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566998 - net-proxy/squidguard segfault on amd64 when adding user-based source acl
Summary: net-proxy/squidguard segfault on amd64 when adding user-based source acl
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Sergey Popov
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-11-27 16:26 UTC by Sergey Kovalskiy
Modified: 2016-07-07 19:28 UTC (History)
0 users

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


Attachments
Patch fixing the issue (squidguard-1.4-64fix.patch,328 bytes, patch)
2015-11-27 16:26 UTC, Sergey Kovalskiy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Kovalskiy 2015-11-27 16:26:42 UTC
Created attachment 418022 [details, diff]
Patch fixing the issue

When built on 64bit system squidguard segfaults on any attempt to add user-based acl. This is due to setuserinfo() function not being declared in any header, the compiler treats it as integer (default behavior?):

sg.y:593:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   sgDbUpdate(sp->userDb, user, (char *) setuserinfo(),

Alas, squidguard own bugtracker is down for whatever reason. Adding declaration of setuserinfo() to sgEx.h fixed the problem for me in both squidguard-1.4 and squidguard-1.5_beta. 

Minimal squidGuard.conf to reproduce:

---
logdir /var/log/squidGuard

src test {
        user test
}

acl {
        default {
                pass any
        }
}
---

Fix (works for both 1.4 and 1.5) is attached to bugreport.
Comment 1 Sergey Popov gentoo-dev 2016-07-07 19:28:48 UTC
Can not reproduce it with supplied config on latest stable system. Reopen if it is still an issue for you