Skip to content

[th/property-direct-set-string] libnm: rework _property_direct_set_string() to support combinations of flags

Thomas Haller requested to merge th/property-direct-set-string into main
Our current properties only set certain modifier flags at a time. There
are even assertions and unit tests that prevent certain flags to be used
together.

However, from point of view of _property_direct_set_string(), there is
no reason to not structure the code in way, so that multiple flags are
handled sensibly. Refactor the code for that.

As before, try to minimize the number of copies. Also take care that
secrets are wiped from memory.

Still, not all combinations are supported. For example, is_secret and
direct_string_is_refstr make no sense together. Or
direct_set_string_mac_address_len and
direct_set_string_ip_address_addr_family.

Merge request reports

Loading