]> git.ipfire.org Git - thirdparty/sarg.git/log
thirdparty/sarg.git
12 years agoAlias IP addresses in the URL using the CIDR notation
Frédéric Marchal [Mon, 20 Jun 2011 20:31:06 +0000 (20:31 +0000)] 
Alias IP addresses in the URL using the CIDR notation

Listing all the addresses in a range is tedious so the syntax is
extended to support the CIDR notation.

Only IPv4 are fully supported at the moment.

12 years agoAdd underscore in scheme characters
Frédéric Marchal [Mon, 20 Jun 2011 07:48:15 +0000 (07:48 +0000)] 
Add underscore in scheme characters

The underscore is not a valid character in the scheme of a URL but it is used
by squid as in cache_object://.

12 years agoUpdate ChangeLog
Frédéric Marchal [Sun, 19 Jun 2011 19:41:31 +0000 (19:41 +0000)] 
Update ChangeLog

12 years agoMerge squidguard_log.c and squidguard_report.c into one file
Frédéric Marchal [Sun, 19 Jun 2011 19:34:15 +0000 (19:34 +0000)] 
Merge squidguard_log.c and squidguard_report.c into one file

The functions are renamed to make them less specific to squidGuard as
they are compatible with other redirectors.

12 years agoAlias the host names in the redirector report
Frédéric Marchal [Sun, 19 Jun 2011 19:33:48 +0000 (19:33 +0000)] 
Alias the host names in the redirector report

The scheme is removed from the URL even for a custom report format and the
URL is always truncated to keep only the host name. The full URL was
always reported for a custom log format.

In addition, the reported host name is replaced by the alias if one is
defined.

There is no grouping of the identical host names as the report list one
access per line along with the access time so there is no grouping any
way.

12 years agoImprove a bit the processing of the URL
Frédéric Marchal [Sun, 19 Jun 2011 19:33:33 +0000 (19:33 +0000)] 
Improve a bit the processing of the URL

Detect more strictly the scheme prefixing the URL to avoid any false
positive.

The caller decides if the full URL must be kept or truncated.

12 years agoDon't report clickable link for aliased url
Frédéric Marchal [Sun, 19 Jun 2011 18:32:18 +0000 (18:32 +0000)] 
Don't report clickable link for aliased url

The HTML reports contain A tags to link to the page visited by the users
but if the host name is aliased, the link is meaningless and must not be
reported.

12 years agoProtect the sort commands against buffer overflow
Frédéric Marchal [Sat, 18 Jun 2011 10:56:40 +0000 (10:56 +0000)] 
Protect the sort commands against buffer overflow

The external sort commands are build by snprintf instead of sprintf
to guard against buffer overflows.

12 years agoExternal sort command delimits the columns only on a tabulation
Frédéric Marchal [Sat, 18 Jun 2011 10:32:16 +0000 (10:32 +0000)] 
External sort command delimits the columns only on a tabulation

The default sort command splits the columns on a blank to non blank
transition but our files only use a tabulation as the column separator.

Therefore, the calls to the external sort command explicitly require
that the columns be identified by a tabulation. It prevents problems
when the fields contain spaces.

12 years agoAlias host names in URL and group identical names
Frédéric Marchal [Sat, 18 Jun 2011 10:31:49 +0000 (10:31 +0000)] 
Alias host names in URL and group identical names

The user can write a file providing rules to replace the host names
extracted from the URL and displayed in the reports. The rules allow
for one wildcard in the host names to be matched.

Identical aliased host named are grouped together in the reports.

13 years agoExplicitly link against libm
Frédéric Marchal [Wed, 25 May 2011 06:03:06 +0000 (06:03 +0000)] 
Explicitly link against libm

Thanks to Diego Elio Pettenò for this patch.

13 years agoFix the error messages when parsing a redirector log with custom format
Frédéric Marchal [Wed, 4 May 2011 09:34:24 +0000 (09:34 +0000)] 
Fix the error messages when parsing a redirector log with custom format

If redirector_log_format is set in sarg.conf, the error messages displayed for
any error encountered while parsing the format string are unclear or wrong.
This patch fix the message and explain really why the format string could not
be used.

13 years agoUse anonymous file and directory names
Frédéric Marchal [Sun, 24 Apr 2011 07:43:51 +0000 (07:43 +0000)] 
Use anonymous file and directory names

The files and directories are named after the user whose report is
about. Therefore, even if the administrator tries to hide the user's
identity with a useratb file, the real identity is still visible in the
URL.

To solve this problem, option anonymous_output_files was added to
sarg.conf. When it is on, each user's file is named using a unique
number that can't be traced back to the real user.

This patch also allows to shorten the URL of the report.

Thanks to dbmaxpayne for suggesting this feature.

13 years agoAdd Danish po file
Frédéric Marchal [Sat, 23 Apr 2011 15:15:45 +0000 (15:15 +0000)] 
Add Danish po file

Thanks to Joe Hansen.

13 years agoRetry if getnameinfo returns EAI_AGAIN
Frédéric Marchal [Sat, 23 Apr 2011 14:58:09 +0000 (14:58 +0000)] 
Retry if getnameinfo returns EAI_AGAIN

The man page tells that the program should try again when getnameinfo
returns EAI_AGAIN but it doesn't say if the program should wait and how
many attempts it should perform. Therefore, we assume the implementation
just want us to call it again but we won't waste more time than that.
The number of IP addresses to resolve is potentially very big and it
doesn't matter much if a few addresses are not resolved.

13 years agoParse the time from a common access log
Frédéric Marchal [Fri, 15 Apr 2011 11:01:46 +0000 (11:01 +0000)] 
Parse the time from a common access log

The time was ignored when parsing a squid log file written with the common
logformat. The consequence was that all the accesses were reported as occuring
at 00:00.

This is a bug introduced in sarg 2.3.

Thanks to Richard P Scott for reporting this bug.

13 years agoDon't abort for an empty report directory
Frédéric Marchal [Fri, 25 Feb 2011 20:32:09 +0000 (20:32 +0000)] 
Don't abort for an empty report directory

If sarg fails and leaves an empty report directory, one without a
sarg-date file in it, any subsequent execution of sarg will fail due to
that empty report directory.

This change ignores such an empty directory and issue a simple warning.

13 years agoUpdate the po files, in particular the Russian translation
Frédéric Marchal [Fri, 25 Feb 2011 20:31:48 +0000 (20:31 +0000)] 
Update the po files, in particular the Russian translation

Thanks to Leonid Pushkarev for the Russian translation.

13 years agoAccept IPv6 addresses in realtime report
Frédéric Marchal [Fri, 25 Feb 2011 11:31:46 +0000 (11:31 +0000)] 
Accept IPv6 addresses in realtime report

13 years agoTake the date_format into account when converting a file
Frédéric Marchal [Fri, 25 Feb 2011 08:05:14 +0000 (08:05 +0000)] 
Take the date_format into account when converting a file

The date_format parameter read from sarg.conf was taken into account too late
in the program flow and was ignored during the convertion or the splitting of a
file. Only command line option -g was effective.

13 years agoDisplay the redirector link on the top users page
Frédéric Marchal [Sun, 13 Feb 2011 16:26:50 +0000 (16:26 +0000)] 
Display the redirector link on the top users page

The previous commit (svn 518) disabled the link from the top user list
to the redirector page.

Thanks to Arnaud Florent for locating the cause of the problem.

13 years agoDon't delete a file twice if -i is given on the command line
Frédéric Marchal [Wed, 9 Feb 2011 20:46:37 +0000 (20:46 +0000)] 
Don't delete a file twice if -i is given on the command line

If sarg is ran with command line option -i, in some circunstances I have
yet to clarify, the ip file is not produced. In that case, the name of
the previously created file (whose name is still in the string buffer)
is deleted a second time. The result is a failure as the file doesn't
exists any more.

Thanks to Arnaud Florent for reporting this bug.

13 years agoAdd the pt_BR translation
Frédéric Marchal [Wed, 9 Feb 2011 18:25:52 +0000 (18:25 +0000)] 
Add the pt_BR translation

Thanks to Mauricio Silveira.

13 years agoCheck for empty body in source code
Frédéric Marchal [Wed, 9 Feb 2011 15:23:29 +0000 (15:23 +0000)] 
Check for empty body in source code

Enable a warning in gcc to stop the compilation if an empty body is found after
some control structures. It should detect stray semi-colons at the end of the
control structures such as if, for, while,...

13 years agoDisable LDAP referrals
Frédéric Marchal [Mon, 7 Feb 2011 18:32:46 +0000 (18:32 +0000)] 
Disable LDAP referrals

LDAP referrals are disabled in ldapsearch. Let's see if that avoid the
Operations Error message produced when querying a MS AD server.

13 years agoTake the result of the test for -Werror=format into account
Frédéric Marchal [Mon, 7 Feb 2011 18:32:32 +0000 (18:32 +0000)] 
Take the result of the test for -Werror=format into account

Due to a copy and paste error, the non availability of -Werror=format in
the compiler was not taken into account.

13 years agoInstall the man page in man/man1
Frédéric Marchal [Mon, 7 Feb 2011 12:49:42 +0000 (12:49 +0000)] 
Install the man page in man/man1

Thanks to Mauricio Silveira for providing the patch.

13 years agoFix a problem with the attributes passed to ldap_search
Frédéric Marchal [Thu, 3 Feb 2011 14:02:18 +0000 (14:02 +0000)] 
Fix a problem with the attributes passed to ldap_search

The attributes list passed to ldap_search must be terminated by a NULL
pointer. That wasn't the case in sarg and was likely responsible for a
segfault. It should be fixed now.

13 years agoSupport for IPv6 addresses in Dansguardian's log
Frédéric Marchal [Wed, 2 Feb 2011 14:01:07 +0000 (14:01 +0000)] 
Support for IPv6 addresses in Dansguardian's log

The buffer to hold an IP address read from Dansguardian's log wasn't
big enough to contain an IPv6 address. The reading of such log was
failing.

13 years agoAccept IPv6 addresses in squidGuard's log
Frédéric Marchal [Wed, 2 Feb 2011 14:00:51 +0000 (14:00 +0000)] 
Accept IPv6 addresses in squidGuard's log

The buffer to store a IP address from squidGuard's log was not big
enough to hold an IPv6 address. That resulted in a getword loop error.

13 years agoUpdate the languages files
Frédéric Marchal [Tue, 1 Feb 2011 19:19:33 +0000 (19:19 +0000)] 
Update the languages files

13 years agoSettle for gettext version 0.18
Frédéric Marchal [Tue, 1 Feb 2011 19:18:52 +0000 (19:18 +0000)] 
Settle for gettext version 0.18

According to the gettext manual, AM_GNU_GETTEXT_VERSION sets the
minimum gettext version required to build the package but it doesn't
look quite right as my system insist on using that exact version of
gettext to install the po files.

13 years agoFix escaping of user id in LDAP query
Frédéric Marchal [Tue, 1 Feb 2011 19:18:30 +0000 (19:18 +0000)] 
Fix escaping of user id in LDAP query

The wrong variable was used uninitialized when escaping the user id
for the LDAP search.

13 years agoAccept any number of user id in the LDAP filter string
Frédéric Marchal [Mon, 31 Jan 2011 20:17:25 +0000 (20:17 +0000)] 
Accept any number of user id in the LDAP filter string

The previous code would only accept up to five %s in the LDAP search
string. It is sufficient in most cases but we can do better than that
and accept any number of occurences as long as the resulting filter
string can fit in the fixed size buffer hard coded in sarg.

13 years agoUse non-deprecated libldap functions
Frédéric Marchal [Mon, 31 Jan 2011 20:17:09 +0000 (20:17 +0000)] 
Use non-deprecated libldap functions

The previously used LDAP functions are marked as deprecated by
libldap. This new code uses the new functions.

In addition, ldap_initialize set the default domain which is not set
by ldap_init and may improve the communication with ADServer.

The new code layout also properly sets the returned user name if the
ID is not found on the LDAP server. The returned user name is the same
as the ID.

13 years agoChange gettext version to suit autopoint 0.17
Frédéric Marchal [Fri, 28 Jan 2011 08:19:27 +0000 (08:19 +0000)] 
Change gettext version to suit autopoint 0.17

Autopoint version 0.17 requires the gettext version to be rounded at
the revision number in AM_GETTEXT_VERSION. Therefore, the previous
minimum required version of 0.15.1 is rounded up to 0.16.

13 years agoHave a more compatible Makefile ?
Frédéric Marchal [Thu, 27 Jan 2011 19:51:25 +0000 (19:51 +0000)] 
Have a more compatible Makefile ?

The patsubst function introduced in sarg 2.3 to avoid the duplicate
file name lists in Makefile.in is a GNU make extension that is not
supported by BSD make. Therefore sarg 2.3 fails to compile on that
system with the default make command.

According to the GNU make documentation, the variable substitution
should be more compatible with other implementations but it isn't
clear whether it is accepted by BSD make or not. Let's try it.

13 years agoLower the minimum gettext version requirement
Frédéric Marchal [Thu, 27 Jan 2011 19:51:10 +0000 (19:51 +0000)] 
Lower the minimum gettext version requirement

We don't have to ask for the most recent version of gettext. A quick
search through gettext's sources showed that 0.15.1 is likely to
contain all the features we need.

In fact, all the features we need may be available since version 0.12
but I'm not sure about that.

13 years agoDon't create final files when index is set to only
Frédéric Marchal [Thu, 27 Jan 2011 15:27:41 +0000 (15:27 +0000)] 
Don't create final files when index is set to only

Some report files are unnecessary when indexonly is set. They are not
generated any more.

The temporary files that produces those files are still created.

13 years agoFix the creation of a report when index is set to only
Frédéric Marchal [Thu, 27 Jan 2011 15:27:26 +0000 (15:27 +0000)] 
Fix the creation of a report when index is set to only

Some unnecessary files are not created as they won't be used in the
report but too many of them are still created, especially the
temporary files. There is room for future improvements.

The index doesn't contain any link to the details of the user's
connections, visited sites, downloads and so on.

13 years agoDon't try to produce the users's report if indexonly is set
Frédéric Marchal [Thu, 27 Jan 2011 15:27:01 +0000 (15:27 +0000)] 
Don't try to produce the users's report if indexonly is set

The creation of the users's report was failing when indexonly was set
because the list of the users to process is taken from memory instead
of collecting it from the files in the output directory.

As no temporary file is created when indexonly is set, the output
directory is empty but as the users's name are still stored in memory,
sarg tried to read the non existant file and aborted.

13 years agoFactorisation of the usage of indexonly
Frédéric Marchal [Thu, 27 Jan 2011 15:26:45 +0000 (15:26 +0000)] 
Factorisation of the usage of indexonly

Several functions were called and then decided to return immediately
if indexonly was set. Most of those functions were called once or
twice but never from more than one place.

This change let the calling function decide if the call must be made
based on the value of indexonly which is always known.

The gain is mainly a reduction of the number of parameters passed to a
few functions. It also makes the code more readable as it is not
necessary to dig into the function to discover that it does nothing in
that case.

13 years agoSet the correct year in the ChangeLog
Frédéric Marchal [Thu, 27 Jan 2011 07:39:55 +0000 (07:39 +0000)] 
Set the correct year in the ChangeLog

Thanks to ungift-ed.

13 years agoSplit the input log file into several files
Frédéric Marchal [Tue, 25 Jan 2011 21:08:34 +0000 (21:08 +0000)] 
Split the input log file into several files

Each file contains one day worth of data. The name of the output file
is made of a user supplied prefix and the date corresponding to the
data in the file. The file may be written in a directory selected with
command line option -o.

Thanks to Mauricio Silveira.

13 years agoDon't try to produce a parsed log if parsed_output_log is none
Frédéric Marchal [Tue, 25 Jan 2011 21:08:09 +0000 (21:08 +0000)] 
Don't try to produce a parsed log if parsed_output_log is none

The correct value to set in parsed_output_log to disable the parsed
log is "no" but if the user enters "none" as is usual with the other
parameters, parsed_output_log is set to an empty string which is not
equivalent to "no". The creation of the parsed log would then proceed
and fail because the path is invalid.

13 years agoFix a warning about the type of sizeof as expected by printf
Frédéric Marchal [Tue, 25 Jan 2011 21:07:55 +0000 (21:07 +0000)] 
Fix a warning about the type of sizeof as expected by printf

The size returned by sizeof should fit easily in a int. No need to use
the more standard %zu that may not be portable to other less
compatible systems.

13 years agoDon't write at root of filesystem if no output directory is provided
Frédéric Marchal [Tue, 25 Jan 2011 21:07:40 +0000 (21:07 +0000)] 
Don't write at root of filesystem if no output directory is provided

The empty output_dir is accepted but it produces an error as the
output directory must be absolute. That restriction might be aleviated
in the future.

13 years agoLDAP search error clarification
Frédéric Marchal [Tue, 25 Jan 2011 13:19:11 +0000 (13:19 +0000)] 
LDAP search error clarification

If the LDAP search fails, in addition to the error message, the
searched string and the base DN are reported.

13 years agoChange year source files's header
Frédéric Marchal [Sun, 23 Jan 2011 06:24:36 +0000 (06:24 +0000)] 
Change year source files's header

13 years agoResolve IPv6 addresses when creating the datafile
Frédéric Marchal [Fri, 21 Jan 2011 15:56:05 +0000 (15:56 +0000)] 
Resolve IPv6 addresses when creating the datafile

There is an option to resolve the addresses of the visited web sites
into an IP address but the existing code was only capable of
converting host names to IPv4 addresses.

If getaddrinfo is available on the system, it is used to resolve the
host names.

13 years agoUpdate the po files
Frédéric Marchal [Wed, 12 Jan 2011 18:55:04 +0000 (18:55 +0000)] 
Update the po files

Update the po files after removing totger.c from the list of the files
to translate. The po files contain the new messages.

13 years agoRemove totger.c from the list of the files to translates
Frédéric Marchal [Wed, 12 Jan 2011 18:54:14 +0000 (18:54 +0000)] 
Remove totger.c from the list of the files to translates

The list of the files to translate still contained totger.c. That
produced a build error.

Thanks to IgorA100 for finding this bug.

13 years agoFix the month numbers read from a sarg log
Frédéric Marchal [Wed, 12 Jan 2011 15:05:10 +0000 (15:05 +0000)] 
Fix the month numbers read from a sarg log

The month numbers parsed from a sarg log file name were in the range 1
to 12 but they must be in the range 0 to 11. This problem has been
fixed thanks to Denis Konchekov.

In addition, the numerical values of the days and months parsed from
the sarg log file name are more strictly validated.

13 years agoTake the time into account when parsing sarg and isa logs
Frédéric Marchal [Sat, 8 Jan 2011 20:35:55 +0000 (20:35 +0000)] 
Take the time into account when parsing sarg and isa logs

The time was ignored when parsing the sarg and isa logs. The result
was that all the access times were reported as occuring at 00:00.

Thanks to kodemi for reporting this bug.

13 years agoFix the parsing of the sarg log file name
Frédéric Marchal [Sat, 8 Jan 2011 20:11:26 +0000 (20:11 +0000)] 
Fix the parsing of the sarg log file name

The parsed log file created when parsed_output_log is set is using a
completly numerical date but, when the log file is read again, sarg
expects the month to be a name and therefore reject the file as having
an invalid name.

Thanks to kodemi for identifying the problem.

13 years agoMove a constant call outside of the loop
Frédéric Marchal [Mon, 27 Dec 2010 15:55:44 +0000 (15:55 +0000)] 
Move a constant call outside of the loop

13 years agoKeep global statistics in memory and use them to check computation
Frédéric Marchal [Mon, 27 Dec 2010 15:00:51 +0000 (15:00 +0000)] 
Keep global statistics in memory and use them to check computation

The total statistics of the log files are kept in memory. They are
reused when necessary instead of parsing again sarg-general.

They are used to validate the processing of sarg-general during the
creation of the e-mail, the top sites and the top users.

13 years agoFix creation of the report's file name from the mangling of the user name
Frédéric Marchal [Mon, 27 Dec 2010 12:30:34 +0000 (12:30 +0000)] 
Fix creation of the report's file name from the mangling of the user name

The directory and file name to store a user's report is produced by
replacing any character but the letters, digits and a few safe
characters from the user name. But that name mangling was not dealing
properly with consecutive invalid characters. The result was, at best,
a truncated file name (without any real consequence) or, at worst, an
invalid character left in the file name.

13 years agoFix empty user reports
Frédéric Marchal [Mon, 27 Dec 2010 12:30:11 +0000 (12:30 +0000)] 
Fix empty user reports

If the user_report_limit was set, the limit was global to all the
reports due to an inadvertendly deleted line in the source code.

13 years agoCheck for the return code when deleting a file
Frédéric Marchal [Sun, 26 Dec 2010 18:29:38 +0000 (18:29 +0000)] 
Check for the return code when deleting a file

Most of the calls to unlink are checked to report an error if the file
cannot be deleted.

The calls that are not checked are call where the file may not exists
and it might not be desirable to abort the process for such an error.

13 years agoCheck for the proper creation of a directory
Frédéric Marchal [Sun, 26 Dec 2010 18:29:03 +0000 (18:29 +0000)] 
Check for the proper creation of a directory

Check the return code of mkdir and display an error message if the
directory could not be created.

13 years agoUse internal user list instead of scanning the directory for users
Frédéric Marchal [Sun, 26 Dec 2010 18:28:45 +0000 (18:28 +0000)] 
Use internal user list instead of scanning the directory for users

Sarg used to scan the temporary directory for files to process and
extract the user name from the files. But, now, it is a waste of time
to read the directory as a list of the known users is alread in
memory.

This change also keep away stray files left by the crash of a previous
run.

13 years agoDon't rebuild sarg.1 when making all
Frédéric Marchal [Sun, 26 Dec 2010 13:13:36 +0000 (13:13 +0000)] 
Don't rebuild sarg.1 when making all

The building of the manpage requires the xsl stylesheets that are not
located at the same place on every system. Moreover, it is not
necessary to rebuild it as it can be shipped with the sources.
Therefore, "make all" only rebuild sarg without making sarg.1.

13 years agoFix indentation of the code
Frédéric Marchal [Sun, 26 Dec 2010 11:13:16 +0000 (11:13 +0000)] 
Fix indentation of the code

The replacement of spaces by tabs to indent the code increased the
missalignement of the code where the indentation was already wrong.

13 years agoLink the user downloading the file to the corresponding user page
Frédéric Marchal [Sun, 26 Dec 2010 11:12:34 +0000 (11:12 +0000)] 
Link the user downloading the file to the corresponding user page

A similar link was available for the denied accesses but not for the
download page.

13 years agoConvert some variables in Makefile to lowercase
Frédéric Marchal [Fri, 24 Dec 2010 08:47:12 +0000 (08:47 +0000)] 
Convert some variables in Makefile to lowercase

The Makefile variables BINDIR, SYSCONFDIR, MANDIR and MAN1DIR are now
written in lowercase as it is the standard way to write such directory
variables with automake.

This change allows the not too uncommon path rewritting during
installation such as "make install bindir=/tmp".

13 years agoStore the man page in $(mandir)/man1
Frédéric Marchal [Thu, 23 Dec 2010 19:13:50 +0000 (19:13 +0000)] 
Store the man page in $(mandir)/man1

The manpage was stored one directory level too high.

Thanks to kodemi for reporting this.

13 years agoAdd option to hide index column
Frédéric Marchal [Tue, 21 Dec 2010 20:22:47 +0000 (20:22 +0000)] 
Add option to hide index column

The directory size column of the index sorted by date can be hidden
with the new index_fields option in sarg.conf.

This option is added because it was reported that the computing of the
directory size may be very slow. See the feature request:

http://sourceforge.net/tracker/index.php?func=detail&aid=3141177&group_id=68910&atid=522794

13 years agoReindent code with tabs instead of space
Frédéric Marchal [Tue, 21 Dec 2010 20:22:24 +0000 (20:22 +0000)] 
Reindent code with tabs instead of space

This is useless except for me as I use tabs with other projects and
have to reconfigure my editor each time I switch to sarg.

13 years agoDelete unused files from the directory containing the user report
Frédéric Marchal [Mon, 29 Nov 2010 20:22:24 +0000 (20:22 +0000)] 
Delete unused files from the directory containing the user report

When the user_report_limit is set and the site_user_time_date report
is requested, the supernumerary time files were not deleted. They were
wasting a lot of disk space.

Now, only the time files that are linked to the user report are kept.

Thanks to alf-man.

13 years agoRemove duplicate function
Frédéric Marchal [Mon, 29 Nov 2010 14:36:05 +0000 (14:36 +0000)] 
Remove duplicate function

13 years agoAdd an option to sort the topsites by time
Frédéric Marchal [Sun, 28 Nov 2010 15:41:03 +0000 (15:41 +0000)] 
Add an option to sort the topsites by time

This option is not identical to the dynamic sort as it selects the top
sites from the entire list and only displays the requested number of
entries. Then the dynamic sort only offers to sort the truncated list.

13 years agoFix a problem in the parsing of the sort option in sarg.conf
Frédéric Marchal [Sun, 28 Nov 2010 15:40:43 +0000 (15:40 +0000)] 
Fix a problem in the parsing of the sort option in sarg.conf

The sort criterion of any sort parameter in sarg.conf was not stored
in the internal variable but or'ed with the default value. Therefore,
the sort was not performed if the selected value was tested after the
default value in the code.

13 years agoReplace the IP address by the user ID in the e-mail report
Frédéric Marchal [Sun, 28 Nov 2010 15:40:28 +0000 (15:40 +0000)] 
Replace the IP address by the user ID in the e-mail report

13 years agoClarify the description of sorttable in sarg.conf
Frédéric Marchal [Sun, 28 Nov 2010 15:40:10 +0000 (15:40 +0000)] 
Clarify the description of sorttable in sarg.conf

13 years agoChange the order of the authors in the man page
Frédéric Marchal [Sun, 28 Nov 2010 15:39:55 +0000 (15:39 +0000)] 
Change the order of the authors in the man page

The first author in sarg_manpage.xml should be the current maintainer
of the document according to the generated groff file.

13 years agoUpgrade to gettext 0.18
Frédéric Marchal [Sat, 27 Nov 2010 21:05:51 +0000 (21:05 +0000)] 
Upgrade to gettext 0.18

Thanks to igora100 for working out the procedure.

13 years agoAdd --lastlog and --keeplogs to the command line options
Frédéric Marchal [Sat, 27 Nov 2010 21:05:35 +0000 (21:05 +0000)] 
Add --lastlog and --keeplogs to the command line options

Those two options supersede the lastlog option from sarg.conf. It is
useful to have them on the command line to change the number of
reports in the daily, weekly or monthly directories.

13 years agoGenerate the manpage from a docbook document
Frédéric Marchal [Sat, 27 Nov 2010 21:05:18 +0000 (21:05 +0000)] 
Generate the manpage from a docbook document

sarg.1 is now produced by processing a xml document. The docbook
document is easier to read and maintain.

The documentation was revised in the process.

13 years agoChange the mouse cursor over a sortable header
Frédéric Marchal [Fri, 26 Nov 2010 12:21:20 +0000 (12:21 +0000)] 
Change the mouse cursor over a sortable header

Thanks to igora100 for the suggestion.

13 years agoDynamically sort the millisecond columns
Frédéric Marchal [Fri, 26 Nov 2010 11:30:28 +0000 (11:30 +0000)] 
Dynamically sort the millisecond columns

The time columns containing the millisecond could not be sorted
properly if formatted with a dot as the separator.

Thanks to igora100 for pointing out the problem.

13 years agoFix an unitialized string
Frédéric Marchal [Tue, 23 Nov 2010 10:14:01 +0000 (10:14 +0000)] 
Fix an unitialized string

The debug message reporting the current value of option -t was
displaying garbage due to an uninitialized variable.

13 years agoImprove javascript inclusion in HTML files
Frédéric Marchal [Sun, 21 Nov 2010 08:19:10 +0000 (08:19 +0000)] 
Improve javascript inclusion in HTML files

The javascript to sort the table is not always included in every
report. It is now loaded only when necessary.

The path to the javascript to include in the HTML report may be
relative to the output_dir.

The code allows for the future use of more javascripts to be loaded on
demand by some pages.

13 years agoCredit the person that suggested the use of sorttable
Frédéric Marchal [Sat, 20 Nov 2010 22:10:50 +0000 (22:10 +0000)] 
Credit the person that suggested the use of sorttable

13 years agoAdd dynamic sorting of some tables
Frédéric Marchal [Sat, 20 Nov 2010 22:07:40 +0000 (22:07 +0000)] 
Add dynamic sorting of some tables

Allow the use of a javascript script to dynamically sort some tables.

The code is tailored for sorttable.js by Stuart Langridge found at
http://www.kryogenix.org/code/browser/sorttable/.

13 years agoRemove trailing spaces in sarg.conf
Frédéric Marchal [Sat, 20 Nov 2010 22:07:10 +0000 (22:07 +0000)] 
Remove trailing spaces in sarg.conf

13 years agoChange version to 2.3.2-pre1
Frédéric Marchal [Sat, 20 Nov 2010 22:06:57 +0000 (22:06 +0000)] 
Change version to 2.3.2-pre1

13 years agoLast line of siteuser page is not the same as the previous ones
Frédéric Marchal [Sat, 20 Nov 2010 22:06:41 +0000 (22:06 +0000)] 
Last line of siteuser page is not the same as the previous ones

The last line of the siteuser.html report page doesn't contain a link
to block the site and doesn't show the bytes column.

This patch makes it identical to the other lines in the report.

13 years agoOptimize time range filtering
Frédéric Marchal [Sat, 20 Nov 2010 22:06:27 +0000 (22:06 +0000)] 
Optimize time range filtering

Filtering of the log entries based on a time or time range passed with
command line option -t is done using numerical values instead of
strings.

13 years agoFix uninitialized variable when double checking the top users
Frédéric Marchal [Sat, 18 Sep 2010 05:06:32 +0000 (05:06 +0000)] 
Fix uninitialized variable when double checking the top users

The configuration option --enable-doublecheck was compiling in an
invalid piece of code that could potentially use an uninitialized
variable when building the list of the top users.

13 years agoChange version number to 2.3.1.
Frédéric Marchal [Sat, 18 Sep 2010 04:44:00 +0000 (04:44 +0000)] 
Change version number to 2.3.1.

13 years agoAdd the new messages for translation in the po files.
Frédéric Marchal [Sat, 18 Sep 2010 04:43:43 +0000 (04:43 +0000)] 
Add the new messages for translation in the po files.

13 years agoEscape the LDAP search string instead of truncating it.
Frédéric Marchal [Wed, 15 Sep 2010 06:16:15 +0000 (06:16 +0000)] 
Escape the LDAP search string instead of truncating it.

A few characters must be escaped in a LDAP search string. Sarg used to
truncate the user login name at the first "dubious" character found in
the string and the list of "dubious" character was much longer than
necessary. Instead of truncating the user login, this patch escape the
characters.

13 years agoReport an error if the tail command cannot read the last lines of the log file when...
Frédéric Marchal [Thu, 2 Sep 2010 07:14:14 +0000 (07:14 +0000)] 
Report an error if the tail command cannot read the last lines of the log file when creating a realtime report.
Surrond the log file name with quotes in the command that read the trailing lines of the log file when creating a realtime report.

13 years agoUpdate the po files
Frédéric Marchal [Fri, 27 Aug 2010 13:17:45 +0000 (13:17 +0000)] 
Update the po files

13 years agoInitialize the variables that are used to build the date range when command line...
Frédéric Marchal [Fri, 27 Aug 2010 13:16:43 +0000 (13:16 +0000)] 
Initialize the variables that are used to build the date range when command line option -d is used.
It should prevent a segfault if the complex nesting of "if" fails to set a variable.
Thanks to ItalianPenguin for reporting this bug.

13 years agoUpdate the ChangeLog.
Frédéric Marchal [Thu, 26 Aug 2010 05:33:19 +0000 (05:33 +0000)] 
Update the ChangeLog.

13 years agoReport an error if the requested date range is invalid. Previous versions would silen...
Frédéric Marchal [Wed, 25 Aug 2010 05:52:25 +0000 (05:52 +0000)] 
Report an error if the requested date range is invalid. Previous versions would silently ignore the date range and take whatever was in the log.

13 years agoDon't delete the temporary directory after sending the e-mail as it is deleted later...
Frédéric Marchal [Tue, 17 Aug 2010 09:00:43 +0000 (09:00 +0000)] 
Don't delete the temporary directory after sending the e-mail as it is deleted later by the program and it prevent the purging routine from working properly.

13 years agoRemove the quotes around the MailUtility command to allow the user to call a script...
Frédéric Marchal [Tue, 17 Aug 2010 09:00:22 +0000 (09:00 +0000)] 
Remove the quotes around the MailUtility command to allow the user to call a script or to add more options to the command.
The description of the mail_utility configuration option has been amended accordingly.