[syslog-ng] [PATCH] tfhash: New template function to calculate the SHA1 of its input
Balazs Scheidler
bazsi77 at gmail.com
Sun Aug 5 16:40:36 CEST 2012
Hi,
Having now actually reviewed the code in question, I'd have some remarks:
1) template functions should rather use command-line parsing than
positional arguments. (e.g. I'd prefer --method, --length, etc as
arguments instead of hardcoding the order)
2) also, it should support a series of positional arguments, which in
turn should be concatenated when producing the hash
3) basicfuncs shouldn't link to the crypto library, rather a new
cryptofuncs module should be introduced, that links against
libsyslog-ng-crypto.so, that module can then include the $(uuid)
function too.
this should be possible:
$(hash --length 8 $HOST $PROGRAM)
to produce a hash of the HOST and PROGRAM fields.
Otherwise great work, thanks Peter and Gergely.
On Sun, Aug 5, 2012 at 1:10 PM, Gergely Nagy
<algernon at madhouse-project.org> wrote:
> Balazs Scheidler <bazsi77 at gmail.com> writes:
>
>> can you at the same time merge the uuid function and this into a cryptofuncs module?
>>
>> I'd try to avoid having completely separate plugin for each template function.
>
> Sure! I'll do that later today, if all goes well.
>
> --
> |8]
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>
--
Bazsi
More information about the syslog-ng
mailing list