Hello,
The %n switch is for Source Domain Name:
All the switches for squidGuard that will be parsed into the redirector
query-string are in the sgParseRedirect subroutine of sgDiv.c (in the
squidGuard src directory):
i.e.;
while((p = strchr(p,'%')) != NULL){
...
switch(*(p + 1)){
case 'a': /* Source Address */
strcat(buf, req->src);
p++;
break;
case 'i': /* Source User Ident */
if (!strcmp(req->ident, "-")) {
strcat(buf, "unknown");
} else {
strcat(buf, req->ident);
}
p++;
break;
...
case 'n': /* Source Domain Name */
if (!strcmp(req->srcDomain, "-")) {
strcat(buf, "unknown");
} else {
strcat(buf, req->srcDomain);
}
p++;
break;
...
squidguard.cgi just reads the query-string after sgParseRedirect
finishes building it based on how you create the template.
As far as I know, there is no variable for Client Username since squid
doesn't know this and squid passes all the data to squidGuard. I might
be wrong, but this is how I understand it.
Hope this helps,
Murrah Boswell
Ted Kaczmarek wrote:
>
> Great work guys, with all the dangers of the Internet you guys truly
> have made the world a better place.
>
> Now, one little quirk, using either squidGuard-simple.cgi or
> squidGuard.cgi I am unable to display
> Client name =
> or
> Client user =
>
> The other info is their.
> This is the redirect from the squidguard.conf.
>
> http://proxy.school.net/squid/squidGuard.cgi?clientaddr=%a&clientname=%n&clientuser=%i&clientgroup=%s&url=%u&targetgroup=%t
>
> Any idea, my perl skills leave a lot to be desired.
>
> Ted