c86904b NSS: Don't use printf(3) on user provided strings.

6 files Authored by stefw 10 years ago, Committed by jhrozek 10 years ago,
    NSS: Don't use printf(3) on user provided strings.
    
    This also fixes several corner cases and crashers.
    
    It's not prudent to pass user input to (even admin) input as a
    format string to printf, and various distros now check for this.
    This can cause accessing memory incorrectly, and various also
    various libc abort()'s.
    
    In addition various assumptions were made about full_name_format
    that aren't necessarily the case if the user uses a more complex
    format.
    
    Use safe-printf.c implementation for formatting full_name_format.
    
    Adapt the NSS resolver so it doesn't barf on formatted strings that
    are shorter than expected given a full_name_format.
    
    Tests added and updated appropriately.
    
        
file modified
+45 -87
file modified
+10 -11
file modified
+37 -77
file modified
+3 -9