summaryrefslogtreecommitdiff
path: root/shared/systemd/nm-sd-utils-shared.c
Commit message (Collapse)AuthorAgeFilesLines
* all: SPDX header conversionLubomir Rintel2019-09-101-16/+2
| | | | | $ find * -type f |xargs perl contrib/scripts/spdx.pl $ git rm contrib/scripts/spdx.pl
* systemd: merge branch systemd into masterThomas Haller2019-07-261-0/+4
|
* shared: add nm_sd_dns_name_to_wire_format()Beniamino Galvani2019-07-051-0/+9
| | | | | | Add nm_sd_dns_name_to_wire_format() based on systemd utilities to convert a name into its wire format according to RFC 1035 section 3.1. It will be used to build the content of the DHCP FQDN option.
* libnm,shared: bzero secrets on failure in nm_utils_base64secret_decode()Thomas Haller2019-04-121-1/+4
| | | | | Now that unbase64mem_full() understands a secure flag, we can get this right.
* systemd: expose unbase64mem() as nm_sd_utils_unbase64mem()Thomas Haller2019-01-021-0/+37
| | | | | | | | | | | | | | | glib has an base64 implementation, but g_base64_decode() et al. gives no way to detect invalid encodings. All invalid codes are silently ignored. That is not suitable for strictly validating user input. Instead of reimplementing of copy-pasting the code from somewhere, reuse systemd's unbase64mem(). But don't use "hexdecoct.h" directly. Instead, add a single accessor function to our "nm-sd-utils-shared.h" gateway. We want to be careful about which bits from systemd we use, because otherwise re-importing systemd code becomes fragile as you don't know which relevant parts changed.
* systemd: move basic systemd library to shared/nm-utilsThomas Haller2019-01-021-0/+45
For better or worse, we already pull in large parts of systemd sources. I need a base64 decode implementation (because glib's g_base64_decode() cannot reject invalid encodings). Instead of coming up with my own or copy-paste if from somewhere, reuse systemd's unbase64mem(). But for that, make systemd's basic bits an independent static library first because I will need it in libnm-core. This doesn't really change anything except making "libnm-systemd-core.la" an indpendent static library that could be used from "libnm-core". We shall still be mindful about which internal code of systemd we use, and only access functionality that is exposed via "systemd/nm-sd-utils-shared.h".