8a2a503 sysdb: add sysdb_attrs_add_val_safe() and sysdb_attrs_add_string_safe()

3 files Authored by sbose 9 years ago, Committed by jhrozek 9 years ago,
    sysdb: add sysdb_attrs_add_val_safe() and sysdb_attrs_add_string_safe()
    
    sysdb_attrs_add_val_safe() works like sysdb_attrs_add_val() but checks
    if the attribute value to add already exists. In this case the value
    list is not changed. This is useful if values are added from different
    sources at different times to avoid LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS
    errors from ldb_modify() later on.
    
    sysdb_attrs_add_string_safe() does the same for string arguments
    
    Reviewed-by: Pavel Březina <pbrezina@redhat.com>
    
        
file modified
+38 -2
file modified
+4 -0
file modified
+103 -0