]> git.ipfire.org Git - thirdparty/systemd.git/commit
nsresource: optionally mangle userns names passed to nsresourced (#35900)
authorLennart Poettering <lennart@poettering.net>
Wed, 8 Jan 2025 20:36:37 +0000 (21:36 +0100)
committerGitHub <noreply@github.com>
Wed, 8 Jan 2025 20:36:37 +0000 (21:36 +0100)
commit0ee1171cbb739fcb54f9502621cebec6ea71b95d
tree496eb6a348f4a435554e032c73516c68f72be314
parenta241b796faeb499822e9c1789c1940bedf96e8a0
parenta73ddc7182e7bc4951360434b81e718dcbeb99ce
nsresource: optionally mangle userns names passed to nsresourced (#35900)

We enforce quite strict rules on naming userns we assign uid ranges to
for users. So strict that they are hard to get right for clients. hence,
let's optionally mangle provided strings so that they work for us.

This should make it much easier to work with the API, as something
reasonable happens regarldess what kind of garbage a client sets as
name.

mangling the name is opt-in for clients, so that there's tight control
for the client on the name, but also "fire and forget".