diff options
author | Stef Walter <stefw@redhat.com> | 2014-01-07 14:44:11 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-01-12 15:24:26 +0100 |
commit | b9d8c6172e48a2633ebe196b2e88bebdf9523c20 (patch) | |
tree | 3ea801f4dbba0a859cbe44f8c3e1affe5fb108ba /src/util/util.h | |
parent | 4b8021779e4db2a212a8214c17e778e843ae2b3a (diff) | |
download | sssd-b9d8c6172e48a2633ebe196b2e88bebdf9523c20.tar.gz sssd-b9d8c6172e48a2633ebe196b2e88bebdf9523c20.tar.xz sssd-b9d8c6172e48a2633ebe196b2e88bebdf9523c20.zip |
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.
Diffstat (limited to 'src/util/util.h')
0 files changed, 0 insertions, 0 deletions