]> git.ipfire.org Git - thirdparty/systemd.git/commit
portabled: refuse queries for empty image name
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 May 2022 12:53:22 +0000 (14:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 May 2022 12:59:50 +0000 (14:59 +0200)
commit4313e2b69fe1bcddd7b551e171f1fa3554155968
treeadc527cc6a7a3df1fbe6b95c9c176a5b3770444c
parentd316426eeef830e44a05248595eba8cdc7085d3b
portabled: refuse queries for empty image name

I took inspiration from pid1:
bus_unit_find()
  → find_unit()
    → manager_load_unit_from_dbus_path()
      → unit_name_from_dbus_path()
        → !startswith(path, "/org/freedesktop/systemd1/unit/")
          → return -EINVAL
          ←
        ←
      ←
    ← if (r < 0) return 0
  ← 0


i.e. we return 0 when queried for "/org/freedesktop/systemd1/unit".

Fixes #23445.
src/portable/portabled-image-bus.c