History log of /sssd-io/src/tests/safe-format-tests.c
Revision Date Author Comments Expand
1c585a6d25e5a0f4d1627b1bf6c4e5bc7c81835e 15-Jan-2014 Lukas Slebodnik <lslebodn@redhat.com>

TESTS: Fix build with older version of check framework

b9d8c6172e48a2633ebe196b2e88bebdf9523c20 12-Jan-2014 Stef Walter <stefw@redhat.com>

util: A safe printf for user provided format strings Since the default printf(3) implementation cannot safely be used on user (or admin) provided input, this is a safe implementation. This will be used in later patches by the full_name_format option The implementation came from realmd, but only has libc dependencies. The number of fields is pre-defined, and safe printf fails if an invalid field is accessed. Only string fields are supported, and only flags relevant to string fields are supported. Width and precision work as expected, but precision cannot read from a field. Tests are included, and ported to the check based testing that sssd uses.