Skip to content

Commit

Permalink
Add 'username missing' message to debug levels 2 or greater
Browse files Browse the repository at this point in the history
  • Loading branch information
liveaverage committed Aug 28, 2013
1 parent 09aa4b1 commit a4ad4c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion squidguard.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ int squidguard_backend_uid(FILE *sg_fd[2], char srcip[15], char srcusr[URL_SIZE]
//Check username length; if there's nothing there, use the IP only:
if (strlen(srcusr) < 1)
{
syslog(LOG_INFO, "squidguard input: username missing, defaulting to IP notation");
if (debug > 2)
{
syslog(LOG_INFO, "squidguard input: username missing, defaulting to IP notation");
}
srcusr[strlen(srcusr)] = '-';
}

Expand Down

0 comments on commit a4ad4c2

Please sign in to comment.