diff options
author | Timo Teräs <timo.teras@iki.fi> | 2011-06-14 16:25:24 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2011-06-14 16:25:24 +0300 |
commit | 8cfce755734a35f725603aa414b6e9d8e6f0f89c (patch) | |
tree | c1b44fe1dc4383371842dfd7ecba456264cbaab5 /src/squark-filter.c | |
parent | 7877caa44efaf1d483e6e3d76c1c6b3b5937e64d (diff) | |
download | squark-8cfce755734a35f725603aa414b6e9d8e6f0f89c.tar.bz2 squark-8cfce755734a35f725603aa414b6e9d8e6f0f89c.tar.xz |
filter: honor squid authenticationv0.2
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.
Diffstat (limited to 'src/squark-filter.c')
-rw-r--r-- | src/squark-filter.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |