The configuration file describes the "ExpDate" parameter as: expiration date to day-month-year (define an expiration date in the format DD-MM-YYYY).
The value is never checked for validity throughout the code. Its only limit is the length of 10 characters. Even the ss5srv blindly copies the value in the write_config function.
I would also expect the value is meant to be in the local time. The documentation does not require to run the daemon with different LC settings.
So what does the S5CheckexpDate(char *expdate) function?
- it copies the string read by the main code
- it appends 00:00:00 (huh, so that means that the expiration time is at "day-month-year 00:00:00)
- it converts the string to the "tm" structure; it does not check the result of the conversion; it does not matter what the structure contained previously
- it gets current date in GMT (currentDate=gmtime(&t);)
- it compares the fields year, month and day and returns ERR when the current date is past the expdate field
So if I do not make a typo in the configuration file and set the rule's expiration date to for example to today (23-06-2012), the rule will expire 24-06-2012 at 02:00:00 because of the time offset and DST.
Otherwise the result is totally unpredictable.