From 8cfce755734a35f725603aa414b6e9d8e6f0f89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 14 Jun 2011 16:25:24 +0300 Subject: filter: honor squid authentication Instead of having separate modes (which would likely need to be configurable on per-subnet or per-user, anyway), honour just the squid reported username. --- src/squark-filter.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/squark-filter.c') diff --git a/src/squark-filter.c b/src/squark-filter.c index 22c8800..ac99a67 100644 --- a/src/squark-filter.c +++ b/src/squark-filter.c @@ -405,6 +405,11 @@ static void read_input(struct sqdb *db) if (authdb_check_login(token, &entry, username, now, &adbc)) { auth_ok = 1; username = BLOB_STRLEN(entry.p.login_name); + } else if (!blob_is_null(username) && blob_cmp(username, dash) != 0) { + auth_ok = 1; + authdb_clear_entry(&entry); + memcpy(entry.p.login_name, username.ptr, username.len); + authdb_commit_login(token, &entry, now, &adbc); } else { auth_ok = 0; } -- cgit v1.2.3