Merge pull request #1138 from tzz/feature/3804-clarify-randomint-upper-bound

Redmine#3804: document exclusive upper bound of randomint()
Merge pull request #1109 from tzz/feature/enterprise/report.pl

contrib/enterprise/report.pl: script to make simple Enterprise reports easier
Fix null pointer reference in length() function.

It's legal for datatype_out to be NULL.
Added safe wrappers to creat, chown, lchown and chmod.

To prevent race conditions in path lookup when we change attributes.

Continuation of issue #3693.
Merge pull request #1140 from kacfengine/safe_stuff

Added safe wrappers to creat, chown, lchown and chmod.
Merge pull request #1141 from kacfengine/length_func_null_ptr_bug

Fix null pointer reference in length() function.
new function: packagesmatching