Skip to content
  • Thomas Haller's avatar
    libnm: add direct_string_allow_empty meta data for NMSetting property · d8e51fae
    Thomas Haller authored
    Most string properties should not accept empty strings. Add a generic
    way to reject them during verify.
    
    Add a new flag NMSettInfoProperty.direct_string_allow_empty.
    
    Note that properties must opt-in to allow empty values. Since all
    existing properties didn't have this check (but hopefully re-implemented
    it in verify()), all existing properties get this flag set to TRUE.
    
    The main point here it that new properties get the strict check by
    default.
    
    We should also review existing uses of direct_string_allow_empty,
    whether the flag can be cleared. This can be done if verify() already
    enforces a non-empty string, or if we accept to break behavior by
    tightening up the check.
    d8e51fae