]> git.ipfire.org Git - thirdparty/sarg.git/log
thirdparty/sarg.git
10 years agoExplicitly link against the math library
Frederic Marchal [Sun, 21 Sep 2014 08:59:39 +0000 (10:59 +0200)] 
Explicitly link against the math library

This patch was suggested by Diego Elio Pettenò on May 25, 2011 and
implemented in commit b966a3a224de2a6ea591458bec47c1bb4e9b3745 but the
patch had not been applied to the CMake build file.

10 years agoFix _FORTIFY_SOURCE redefinition error
Frederic Marchal [Sun, 21 Sep 2014 08:56:21 +0000 (10:56 +0200)] 
Fix _FORTIFY_SOURCE redefinition error

Some systems define _FORTIFY_SOURCE by default. It conflicts with our use
of that macro when --enable-extraprotection is passed to the configuration
script.

The solution is to undefine it before redefining it with value 2.

If a higher _FORTIFY_LEVEL level ever appears, it will have to be used in
this program to benefit from the highest protection possible.

10 years agoClean up sarg-php HTML and report more errors
Frederic Marchal [Wed, 21 May 2014 19:42:03 +0000 (21:42 +0200)] 
Clean up sarg-php HTML and report more errors

The original HTML was the bare minimum and no error messages were printed.
This patch should fix it if only someone could test it.

10 years agoSarg.conf search exclude_codes in the default directory
Frederic Marchal [Mon, 14 Apr 2014 14:32:27 +0000 (16:32 +0200)] 
Sarg.conf search exclude_codes in the default directory

The default sarg.conf was looking for exclude_codes at the wrong place.

Thanks to José Vicente Mondejar for reporting this bug.

10 years agoMay fix some errors in sarg-php
Frederic Marchal [Mon, 14 Apr 2014 11:06:00 +0000 (13:06 +0200)] 
May fix some errors in sarg-php

Sarg-php was in a sorry state but as Jose Vicente Mondejar kindly provided
a translation, I felt obliged to try to improve things a bit.

I can't test it on my computer. I hope I didn't broke it more than it was.

10 years agoFix a link error with libpcre
Frederic Marchal [Thu, 28 Nov 2013 18:47:35 +0000 (19:47 +0100)] 
Fix a link error with libpcre

Libpcre was linked at the beginning of the link command. It was fine with
some compilers but not with others.

Libraries are supposed to be linked after every *.o file that use them or
some linker (gold?) reports errors about undefined references to functions.

Thanks to Micha Voss for reporting this problem and testing the solution.

10 years agoClang compatibility fix
Frederic Marchal [Thu, 21 Nov 2013 08:31:53 +0000 (09:31 +0100)] 
Clang compatibility fix

Option to not fail on integers sign comparison must come after the extra
warnings have been enabled or it is ignored.

10 years agoReport LDAP status at the end of the configuration script
Frederic Marchal [Wed, 6 Nov 2013 07:15:29 +0000 (08:15 +0100)] 
Report LDAP status at the end of the configuration script

As was already done with gd and pcre, the lack of ldap support is
reported at the end of the configuration script.

10 years agoFix a message text in configure.
Frederic Marchal [Wed, 6 Nov 2013 07:13:42 +0000 (08:13 +0100)] 
Fix a message text in configure.

10 years agoCheck that every required ldap header file is available
Frederic Marchal [Wed, 6 Nov 2013 07:12:29 +0000 (08:12 +0100)] 
Check that every required ldap header file is available

LDAP support is only enabled if every required header file is detected on
the target system.

11 years agoProcess correctly run together options
Frederic Marchal [Thu, 25 Jul 2013 05:32:46 +0000 (07:32 +0200)] 
Process correctly run together options

If sarg is ran with option -l combined with any other option such as -xl,
then the -l option is mistaken as --lastlog and does not produce the
expected result (which is to use the access.log file passed as argument).

It has been fixed by requiring that any long option is préfixed with a
double dash.

It breaks the compatibility with old versions but nobody should notice.

Thanks to Leonardo Rodrigues for reporting this bug.

11 years agoMerge branch 'master' of ssh://git.code.sf.net/p/sarg/code
Frederic Marchal [Thu, 25 Jul 2013 04:48:05 +0000 (06:48 +0200)] 
Merge branch 'master' of ssh://git.code.sf.net/p/sarg/code

11 years agoFix several possible sprintf buffer overflows
Frederic Marchal [Tue, 23 Jul 2013 11:02:13 +0000 (13:02 +0200)] 
Fix several possible sprintf buffer overflows

At least one of those sprintf was producing a segfault when a very long
elapsed time was encountered.

Thanks to Ricardo Fregati for reporting this bug and Marc Cesarine for
solving it.

11 years agoApply a recommendation from gcc
Frederic Marchal [Wed, 12 Jun 2013 05:39:56 +0000 (07:39 +0200)] 
Apply a recommendation from gcc

Gcc suggested to put parentheses around an operator to clarify a if
statement.

11 years agoUse a string to decide the content of the per_user_limit file
Frederic Marchal [Thu, 6 Jun 2013 12:31:45 +0000 (14:31 +0200)] 
Use a string to decide the content of the per_user_limit file

Instead of a numerical value 0/1, the strings "ip" or "id" are used in the
per_user_limit option to decide if the file contains the IP address or the
user's ID.

11 years agoAn aliased IP address is not an IP address any more
Frederic Marchal [Thu, 6 Jun 2013 12:25:24 +0000 (14:25 +0200)] 
An aliased IP address is not an IP address any more

If the user's IP address is aliased, it must not be considered to be an
IP address to be resolved by the DNS.

11 years agoFix the aliasing of an IPv4 address
Frederic Marchal [Thu, 6 Jun 2013 12:22:39 +0000 (14:22 +0200)] 
Fix the aliasing of an IPv4 address

The comparison was not working properly and the line of code was a little
bit obfuscated.

11 years agoAdd an option to create the per_user_limit files
Frederic Marchal [Thu, 6 Jun 2013 11:05:17 +0000 (13:05 +0200)] 
Add an option to create the per_user_limit files

Sarg.conf allows the user to either always create a per_user_limit file
even if it is empty or only create it if some user crosses the limit.

11 years agoAdd a function to look a user up by IP address
Frederic Marchal [Thu, 6 Jun 2013 09:55:56 +0000 (11:55 +0200)] 
Add a function to look a user up by IP address

The function is currently unused but I might have had some use for it so I
left it in the code.

11 years agoCreate multiple per_user_limit files
Frederic Marchal [Wed, 5 Jun 2013 20:17:02 +0000 (22:17 +0200)] 
Create multiple per_user_limit files

Each file can have a different limit.

For each file, it is possible to write the user's ID or the user's IP
address.

If the files exists, they are purged.

11 years agoDon't generate the date/time report page if it isn't used
Frederic Marchal [Mon, 3 Jun 2013 12:58:50 +0000 (14:58 +0200)] 
Don't generate the date/time report page if it isn't used

The temporary file may still be created but it will be deleted before sarg
exits.

As a consequence, if temporary files are kept, the temporary directory may
hold more files than were actually used.

11 years agoDon't segfault if date_time_by is empty
Frederic Marchal [Mon, 3 Jun 2013 10:35:45 +0000 (12:35 +0200)] 
Don't segfault if date_time_by is empty

Thanks to nuphero for reporting this bug and helping in tracking it down.

11 years agoRemove bashisms from configure.in
Frederic Marchal [Sat, 1 Jun 2013 17:36:58 +0000 (19:36 +0200)] 
Remove bashisms from configure.in

Tests using == as equality operator are not portable. They are replaced by
a single =.

Thanks to Renato Botelho for reporting this bug.

11 years agoFix the reporting of downloaded files
Frederic Marchal [Thu, 30 May 2013 19:36:10 +0000 (21:36 +0200)] 
Fix the reporting of downloaded files

The reporting of downloaded files was in fact reporting the denied accesses
since a previous changes in version 2.4.

11 years agoFix some compiler warnings
Frederic Marchal [Thu, 30 May 2013 09:30:07 +0000 (11:30 +0200)] 
Fix some compiler warnings

Unused variables.

11 years agoMerge branch 'master' of ssh://git.code.sf.net/p/sarg/code
Frederic Marchal [Thu, 30 May 2013 08:47:52 +0000 (10:47 +0200)] 
Merge branch 'master' of ssh://git.code.sf.net/p/sarg/code

Conflicts:
html.c

11 years agoAvoid rereading the user_limit file each time a user is added
Frederic Marchal [Thu, 30 May 2013 08:41:01 +0000 (10:41 +0200)] 
Avoid rereading the user_limit file each time a user is added

Each time a user reach the download limit, he/she is added to the
user_limit file only once. Instead of rereading the whole file to see if
the user is already there, a flag is kept in memory to track already
limited users.

11 years agoCompare correctly a per user limit greater than 2GB
Frederic Marchal [Wed, 29 May 2013 19:54:21 +0000 (21:54 +0200)] 
Compare correctly a per user limit greater than 2GB

A user limit greater than 2GB would sometime list the user into the
limit file even though the user does not exceed the limit.

Thanks to RodinM for reporting this bug.

11 years agoIconv converts the terminating NUL in the LDAP string
Frederic Marchal [Wed, 29 May 2013 19:20:45 +0000 (21:20 +0200)] 
Iconv converts the terminating NUL in the LDAP string

The LDAP string was not completely converted and was lacking the
terminating zero.

11 years agoApply patch 36 submitted by Dayel Zabin
Frederic Marchal [Sun, 26 May 2013 18:36:57 +0000 (20:36 +0200)] 
Apply patch 36 submitted by Dayel Zabin

The patch converts the string returned by a LDAP search into a user
selected character set.

The patch has been slightly modified to avoid memory leaks and report
errors the sarg's way.

11 years agoBuild alias.c with cmake
Frederic Marchal [Sun, 26 May 2013 18:24:29 +0000 (20:24 +0200)] 
Build alias.c with cmake

11 years agoUpdate the build date
Frederic Marchal [Mon, 13 May 2013 08:35:04 +0000 (10:35 +0200)] 
Update the build date

11 years agoDon't force the use of libpcre
Frederic Marchal [Mon, 13 May 2013 08:32:47 +0000 (10:32 +0200)] 
Don't force the use of libpcre

Libpcre was always included in alias.c to do some testing but it breaks
the compilation when libpcre isn't available. It has been removed.

11 years agoSuppress warning when compiling with mingw
Frederic Marchal [Mon, 13 May 2013 08:31:13 +0000 (10:31 +0200)] 
Suppress warning when compiling with mingw

Mingw doesn't accept the __attribute__ option. It is removed when
compiling with that compiler.

11 years agoMerge branch 'master' of ssh://git.code.sf.net/p/sarg/code
Frederic Marchal [Sat, 30 Mar 2013 12:24:18 +0000 (13:24 +0100)] 
Merge branch 'master' of ssh://git.code.sf.net/p/sarg/code

11 years agoReport a proper message if a log file cannot be read
Frederic Marchal [Sat, 30 Mar 2013 12:19:15 +0000 (13:19 +0100)] 
Report a proper message if a log file cannot be read

Previous versions used to report that the file doesn't exist if the user
doesn't have read access.

Thanks to Henry Lin for reporting this bug.

11 years agoReport a proper message if a log file cannot be read
Frederic Marchal [Sat, 30 Mar 2013 12:19:15 +0000 (13:19 +0100)] 
Report a proper message if a log file cannot be read

Previous versions used to report that the file doesn't exist if the user
doesn't have read access.

Thanks to Henri Lin for reporting this bug.

11 years agoMake sarg as the default target
Frederic Marchal [Sat, 16 Mar 2013 08:51:26 +0000 (09:51 +0100)] 
Make sarg as the default target

This bug was introduced after listing the source files dependencies.

11 years agoFix some messages from the configure script
Frederic Marchal [Sun, 10 Mar 2013 18:06:07 +0000 (19:06 +0100)] 
Fix some messages from the configure script

Get rid of the hard coded echo instructions.

11 years agoAdd a user alias
Frederic Marchal [Fri, 8 Mar 2013 18:08:17 +0000 (19:08 +0100)] 
Add a user alias

It is similar to the hostalias file but is applied to the user ID.

11 years agoProper include dependencies in Makefile
Frederic Marchal [Sat, 23 Feb 2013 18:40:22 +0000 (19:40 +0100)] 
Proper include dependencies in Makefile

The Makefile build the necessary source files when a header file is
changed.

11 years agoUse constant strings for the IP address and user name read from the log file
Frederic Marchal [Sat, 23 Feb 2013 18:26:30 +0000 (19:26 +0100)] 
Use constant strings for the IP address and user name read from the log file

11 years agoFix an error when processing NTLM user formatted name
Frederic Marchal [Sat, 23 Feb 2013 18:08:59 +0000 (19:08 +0100)] 
Fix an error when processing NTLM user formatted name

An uninitialized variable was used to split the user name when the format
was declared as NTLM.

11 years agoUpdate po files
Frederic Marchal [Mon, 28 Jan 2013 11:01:35 +0000 (12:01 +0100)] 
Update po files

11 years agoDisambiguate the string "time" for the translators
Frederic Marchal [Mon, 28 Jan 2013 10:56:42 +0000 (11:56 +0100)] 
Disambiguate the string "time" for the translators

The same word is used whether the value is a wall-clock time or a duration.
Translators may need to translate them with different words.

11 years agoRewrite the function to format numbers with a suffix KMGT
Frederic Marchal [Sun, 27 Jan 2013 14:33:35 +0000 (15:33 +0100)] 
Rewrite the function to format numbers with a suffix KMGT

The function use less string manipulation functions for one or two bytes
strings. The bytes are copied one at a time. It makes the code more
readable.

Suffixes up to yotta are supported.

A comma is used when configured to to so with use_comma in sarg.conf.

11 years agoWork around a bug in mingw's snprintf
Frederic Marchal [Sat, 26 Jan 2013 19:16:07 +0000 (20:16 +0100)] 
Work around a bug in mingw's snprintf

snprintf doesn't limit the output string to the requested size (or at least
not strictly). The formatted numbers displayed in the report were wrong.

11 years agoTest for an absolute path on Windows
Frederic Marchal [Sat, 26 Jan 2013 18:40:25 +0000 (19:40 +0100)] 
Test for an absolute path on Windows

The code to test for an absolute path on Windows was not compiled because
the constant to enable that code is not supported.

11 years agoInstall sarg.exe on Windows
Frederic Marchal [Sat, 26 Jan 2013 17:14:36 +0000 (18:14 +0100)] 
Install sarg.exe on Windows

Use the executable extension discovered by the configuration script when
installing sarg.

11 years agoRevert to an old version of the Chinese translation
Frederic Marchal [Sat, 26 Jan 2013 07:43:38 +0000 (08:43 +0100)] 
Revert to an old version of the Chinese translation

Several merge conflict tags has gone unnoticed. Since the po file hasn't
been modified for a long time, it is safe to revert to the old version.

Some characters had been damaged too. This version looks good from the
po point of view.

11 years agoRemove merge tags from the po files
Frederic Marchal [Fri, 25 Jan 2013 21:31:45 +0000 (22:31 +0100)] 
Remove merge tags from the po files

A merge conflict in the po files must have gone unnoticed and the conflict
tags were committed. They have now been removed.

11 years agoUgly patch to link on Windows
Frederic Marchal [Fri, 25 Jan 2013 20:58:31 +0000 (21:58 +0100)] 
Ugly patch to link on Windows

Library ws2_32 is required when compiling on Windows but the autoconf macro
to test for a library doesn't work due to the special declaration of the
functions in that library.

11 years agoLink against an external libintl
Frederic Marchal [Fri, 25 Jan 2013 20:15:11 +0000 (21:15 +0100)] 
Link against an external libintl

Without this library, the linker complains about missing libintl_gettext
and the like if gettext is not part of libc.

11 years agoSuppress warnings from the compiler for unused variables
Frederic Marchal [Fri, 25 Jan 2013 19:48:13 +0000 (20:48 +0100)] 
Suppress warnings from the compiler for unused variables

11 years agoFix a warning about an uninitialized variable
Frederic Marchal [Fri, 25 Jan 2013 19:21:22 +0000 (20:21 +0100)] 
Fix a warning about an uninitialized variable

11 years agoDon't complain if pcre.h is not available
Frederic Marchal [Fri, 25 Jan 2013 19:19:10 +0000 (20:19 +0100)] 
Don't complain if pcre.h is not available

The file can be compiled even if pcre is not available.

11 years agoCheck for winsock.h
Frederic Marchal [Fri, 25 Jan 2013 19:10:12 +0000 (20:10 +0100)] 
Check for winsock.h

The header file is required to compile sarg on windows but its
availability was not checked in the configuration script.

11 years agoUpdate program build date
Frederic Marchal [Thu, 24 Jan 2013 21:19:08 +0000 (22:19 +0100)] 
Update program build date

11 years agoWrite the access times in one html page
Frederic Marchal [Thu, 24 Jan 2013 21:17:23 +0000 (22:17 +0100)] 
Write the access times in one html page

Web sites access times were written in a file named after the user's name
and the visited site URL. There were one file per site, they were small and
numerous. In fact, they could be so numerous that they could fill the disk
inode table.

Moreover, with a file name made of the user's name and the visited site
URL, the manufactured file name could be more than 256 characters resulting
in an OS error on Windows and Linux.

To fix these two problems, the access times are all grouped inside one web
page with anchors to directly scroll to the relevant site. The html file
name is fixed (tt.html) and doesn't depend on the user's name or web
site URL.

11 years agoMake sure the configure script is up to date when packaging the project
Frederic Marchal [Sat, 12 Jan 2013 09:28:39 +0000 (10:28 +0100)] 
Make sure the configure script is up to date when packaging the project

The configure script must exist and have been updated by autoreconf before
sarg can be released.

11 years agoPackaging script accepts a tag with a translation suffix
Frederic Marchal [Sat, 12 Jan 2013 09:20:46 +0000 (10:20 +0100)] 
Packaging script accepts a tag with a translation suffix

When a translation is submitted after the version has been tagged, a new
tag is added with the language as a suffix. It must be accepted by the
packaging script.

11 years agoUpdate the date in the header of every C file
Frederic Marchal [Sat, 5 Jan 2013 06:18:29 +0000 (07:18 +0100)] 
Update the date in the header of every C file

11 years agoMangled file name is really unique
Frederic Marchal [Fri, 4 Jan 2013 18:47:16 +0000 (19:47 +0100)] 
Mangled file name is really unique

Due to an error, the file name created by mangling the user ID was not
using the suffix that was supposed to make it unique. Therefore, user's
names made of several consecutive non alphanumeric characters were not
unique.

The error manifested itself as an error message saying that the
_.user_unsort file could not be sorted. It occurred after the first
user assigned to the _ file name had been sorted and its file deleted.
Therefore any subsequent user sharing the _ file name would fail.

This patch also makes sure no original user name might possibly ends up
being the same as a mangled name.

11 years agoUse less memory to store the user strings
Frederic Marchal [Fri, 4 Jan 2013 14:19:21 +0000 (15:19 +0100)] 
Use less memory to store the user strings

Use the string buffer object to store the strings corresponding to the
users. It takes much less memory as the strings only take the exact amount
of memory instead of allocating a fixed size buffer as big as the biggest
expected string.

11 years agoDon't ignore lines starting with a space in access.log
Frederic Marchal [Thu, 3 Jan 2013 07:10:31 +0000 (08:10 +0100)] 
Don't ignore lines starting with a space in access.log

Sarg was ignoring any access.log line starting with a space character. I
see no reasons for this limitation. Therefore, I simply removed it.

Any restriction on the processed lines should be placed in the specific
format engine that requires it.

11 years agoExplain why some input log lines are ignored
Frederic Marchal [Wed, 26 Dec 2012 16:23:54 +0000 (17:23 +0100)] 
Explain why some input log lines are ignored

When verbose mode is enabled, a listing explaining how many lines have
been excluded is displayed. Every reason to ignore a line is listed. It
should make it easier to figure out why the report is not generated.

11 years agoMake sure the total number of lines read is big enough
Frederic Marchal [Wed, 26 Dec 2012 16:14:56 +0000 (17:14 +0100)] 
Make sure the total number of lines read is big enough

Use an unsigned long int to store the number of lines read from the access
log file.

11 years agoGet rid of the limit on the number of input files
Frédéric Marchal [Sun, 16 Dec 2012 17:11:55 +0000 (18:11 +0100)] 
Get rid of the limit on the number of input files

Previous versions were limited to 255 access log files with a maximum
length of 1024 characters. That limit has been alleviated.

11 years agoReplace the "getword loop" messages
Frédéric Marchal [Sun, 16 Dec 2012 17:06:24 +0000 (18:06 +0100)] 
Replace the "getword loop" messages

The "getword loop" messages are unclear. They don't explain what went
wrong.

The new messages explain that the end of a word or number was not found.

11 years agoFix a message string
Frédéric Marchal [Sun, 16 Dec 2012 17:04:07 +0000 (18:04 +0100)] 
Fix a message string

11 years agoMake a translator friendly message out of pieced together words
Frédéric Marchal [Sun, 16 Dec 2012 17:03:51 +0000 (18:03 +0100)] 
Make a translator friendly message out of pieced together words

The "generated by" message written at the page bottom was made out of
words assembled together during the page generation. It was not possible
to translate that message.

11 years agoInclude Danish translation
Frédéric Marchal [Sun, 7 Oct 2012 07:06:04 +0000 (09:06 +0200)] 
Include Danish translation

11 years agoMake one function to read an input log
Frédéric Marchal [Sat, 29 Sep 2012 18:33:09 +0000 (20:33 +0200)] 
Make one function to read an input log

This is the first step to read files using wildcards in the
configuration file.

11 years agoFix the month extracted from a common log format
Frédéric Marchal [Sat, 29 Sep 2012 16:05:02 +0000 (18:05 +0200)] 
Fix the month extracted from a common log format

The month number was one value short of the right value due to one
supernumerary subtraction

12 years agoBe more thorough when ensuring a file is correctly written
Frédéric Marchal [Wed, 12 Sep 2012 17:40:48 +0000 (19:40 +0200)] 
Be more thorough when ensuring a file is correctly written

The return status of every written file is checked when the file is closed.
Any incorrectly written file should be detected early and a proper message
should be reported.

12 years agoOverwrite any existing dansguardian temporary file
Frédéric Marchal [Sun, 9 Sep 2012 13:44:26 +0000 (15:44 +0200)] 
Overwrite any existing dansguardian temporary file

When sarg parses a dansguardian log, the temporary file to store the
parsed value is overwritten if it exists instead of appending the entries
at the end of any left over from a previous run.

12 years agoExplain the reason when a file cannot be opened
Frédéric Marchal [Thu, 6 Sep 2012 18:09:15 +0000 (20:09 +0200)] 
Explain the reason when a file cannot be opened

The system error string is written in the error message when a file cannot
be opened. It should help in diagnosing the reason for a failure.

12 years agoReport the IP address from which the user visited some site
Frédéric Marchal [Fri, 31 Aug 2012 20:06:39 +0000 (22:06 +0200)] 
Report the IP address from which the user visited some site

The IP address makes sense in that report to detect users visiting sites
from another computer but still identified by their credential.

12 years agoRemove a message about the redirector log that can't be deleted
Frédéric Marchal [Fri, 31 Aug 2012 19:46:41 +0000 (21:46 +0200)] 
Remove a message about the redirector log that can't be deleted

If no redirector log was provided, a message was displayed in debug mode to
inform the user about a temporary file that can't be deleted. That message
was unnecessary and misleading. It is now displayed only when appropriate.

12 years agoDownload report encapsulated in a module
Frédéric Marchal [Fri, 31 Aug 2012 17:09:19 +0000 (19:09 +0200)] 
Download report encapsulated in a module

Module build upon the model of the denied and authfail reports.

12 years agoAdd a safety to prevent the deletion of files that haven't been created
Frédéric Marchal [Fri, 31 Aug 2012 16:58:54 +0000 (18:58 +0200)] 
Add a safety to prevent the deletion of files that haven't been created

There was a path in the source code where sarg could try to delete the
temporary unsorted files of the denied and authfail reports without
checking that the file names were not empty.

The functions where the guard was added are not supposed to be called if
no reports are to be generated but that check relies on the caller. If the
caller fails and call the function to generate the reports, it will try
to delete a file whose name is empty.

12 years agoDon't delete the denied and authfail temporary files if requested
Frédéric Marchal [Fri, 31 Aug 2012 16:54:46 +0000 (18:54 +0200)] 
Don't delete the denied and authfail temporary files if requested

The temporary unsorted files containing the denied and authfail could be
deleted when the user had requested to keep the temporary files.

12 years agoAutoconfigure the XSL stylesheets to produce the man page
Frédéric Marchal [Thu, 30 Aug 2012 05:52:39 +0000 (07:52 +0200)] 
Autoconfigure the XSL stylesheets to produce the man page

The configure script detects Debian and Gentoo current XSL stylesheets
paths and use the appropriate one when generating the man page.

12 years agoAdd the documentation for the --statistics parameter
Frédéric Marchal [Thu, 30 Aug 2012 05:40:17 +0000 (07:40 +0200)] 
Add the documentation for the --statistics parameter

Documentation added to the man page and the usage page displayed by sarg.

12 years agoCompute and display execution statistics
Frédéric Marchal [Wed, 29 Aug 2012 18:23:39 +0000 (20:23 +0200)] 
Compute and display execution statistics

The total run time is displayed along with the number of lines read in the
input logs, the number of records kept and the number of users.

The time it takes to read the input log files and the time it takes to
process the records are computed.

12 years agoTell in sarg.conf that access_log can be repeated
Frédéric Marchal [Wed, 29 Aug 2012 05:47:46 +0000 (07:47 +0200)] 
Tell in sarg.conf that access_log can be repeated

The possibility of repeating access_log to read more than one log file was
not documented. It is now documented in sarg.conf.

12 years agoChange version number to 2.4.0-pre1
Frédéric Marchal [Tue, 28 Aug 2012 06:22:32 +0000 (08:22 +0200)] 
Change version number to 2.4.0-pre1

The last digit will serve as a bug fix counter.

The build date is up to date.

12 years agoDon't trash the period when reading multiple log files
Frédéric Marchal [Tue, 28 Aug 2012 06:09:58 +0000 (08:09 +0200)] 
Don't trash the period when reading multiple log files

Reading multiple input log files overwrite the period due to the
processing made before reading a new file in readlog_sarg.c.

This fix make sure the period is as big as the total period of all the logs
read by sarg. It doesn't take into account gaps in the logs.

12 years agoFix the filtering out of the log based on a date
Frédéric Marchal [Mon, 27 Aug 2012 12:31:33 +0000 (14:31 +0200)] 
Fix the filtering out of the log based on a date

The date range was ignored and, in the worst case, no entries were
reported.

12 years agoDon't keep the % in the URL when converted into a file name
Frédéric Marchal [Sun, 26 Aug 2012 17:40:10 +0000 (19:40 +0200)] 
Don't keep the % in the URL when converted into a file name

When a file name is manufactured from a URL, the percent sign is removed to
prevent the web server or the browser from requesting a file with a % in
it.

The server or the browser would decode the percent sign if the two
subsequent bytes happened to be a valid hexadecimal byte and would request
the wrong file.

12 years agoRemove trailing spaces in every source file
Frédéric Marchal [Sun, 26 Aug 2012 17:35:01 +0000 (19:35 +0200)] 
Remove trailing spaces in every source file

12 years agoFix the reported year in the extended log
Frédéric Marchal [Sun, 26 Aug 2012 17:19:50 +0000 (19:19 +0200)] 
Fix the reported year in the extended log

The year was not properly encoded in the internal structure.

12 years agoKeep reading the log files even with a small number of errors
Frédéric Marchal [Sun, 26 Aug 2012 16:47:25 +0000 (18:47 +0200)] 
Keep reading the log files even with a small number of errors

Sarg tolerates a few errors in the input log files. The number of errors
can be configured. Sarg can stop on some consecutive errors and on the
total number of errors.

12 years agoAllow an empty data size in a common log
Frédéric Marchal [Sun, 26 Aug 2012 15:37:23 +0000 (17:37 +0200)] 
Allow an empty data size in a common log

Any column of the common log format may be - to denote missing or
no applicable data. In particular, apache writes a - when the URL is a
redirection. That case is taken into account with this patch.

12 years agoAccept common log files without extension column
Frédéric Marchal [Sun, 26 Aug 2012 15:25:49 +0000 (17:25 +0200)] 
Accept common log files without extension column

The sample common log file used to test the program contained additional
columns. The standard common log format doesn't have those column. Sarg
failed to parse the standard format due to the lack of any supernumerary
column.

12 years agoRemove trailing spaces
Frédéric Marchal [Sun, 26 Aug 2012 15:24:37 +0000 (17:24 +0200)] 
Remove trailing spaces

12 years agoChange the structure to search for the current log format
Frédéric Marchal [Sun, 26 Aug 2012 15:16:31 +0000 (17:16 +0200)] 
Change the structure to search for the current log format

Rewrite the loop to scan through the known log formats to make it more
readable and let the compiler optimize it.

12 years agoIgnore the sarg log file name until the format is confirmed
Frédéric Marchal [Sun, 26 Aug 2012 14:50:36 +0000 (16:50 +0200)] 
Ignore the sarg log file name until the format is confirmed

The validity of the sarg input log file must be delayed until the format
header is detected or the filter will fail when parsing any other log
format.

12 years agoPurge the old log file decoding code
Frédéric Marchal [Sun, 26 Aug 2012 13:56:55 +0000 (15:56 +0200)] 
Purge the old log file decoding code

The legacy code to read the log files is gone for good.

12 years agoExtract the covered period from the sarg log file
Frédéric Marchal [Sun, 26 Aug 2012 13:53:52 +0000 (15:53 +0200)] 
Extract the covered period from the sarg log file

A sarg log file is named after the covered date range. The range is
extracted and used in the report.