]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared: add parser for SocketBind{Allow|Deny}=
authorJulia Kartseva <hex@fb.com>
Tue, 29 Jun 2021 23:04:32 +0000 (16:04 -0700)
committerJulia Kartseva <hex@fb.com>
Wed, 30 Jun 2021 07:36:26 +0000 (00:36 -0700)
commit8bd095aa9a1ec03dd8ccbbf1963d069fb7b2bdda
treec05d12d44f332bec95559c9cf5623d32b46f65d3
parent159d68c3e09657b4fd252b2c5ea6ef3095a37ad2
shared: add parser for SocketBind{Allow|Deny}=

Parse address family, ip protocol and ports, any of them can be
optional. If neither is specified, a special value 'any' is expected.
Helper is placed in shared to be reused in both fragment and dbus.
Add unit tests with valid and invalid examples.
src/shared/meson.build
src/shared/parse-socket-bind-item.c [new file with mode: 0644]
src/shared/parse-socket-bind-item.h [new file with mode: 0644]
src/test/meson.build
src/test/test-parse-socket-bind-item.c [new file with mode: 0644]