chiark / gitweb /
core: rework unit name validation and manipulation logic
authorLennart Poettering <lennart@poettering.net>
Thu, 30 Apr 2015 18:21:00 +0000 (20:21 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 07:20:50 +0000 (08:20 +0100)
commit0eb4b7f2e7ed1dda0511b440ec002c668de99fb9
tree92d5c03791f78d4b0824593c9b928283f2803534
parent3a296a5fe6c06deb497b09ab29b8363761b2885d
core: rework unit name validation and manipulation logic

A variety of changes:

- Make sure all our calls distuingish OOM from other errors if OOM is
  not the only error possible.

- Be much stricter when parsing escaped paths, do not accept trailing or
  leading escaped slashes.

- Change unit validation to take a bit mask for allowing plain names,
  instance names or template names or an combination thereof.

- Refuse manipulating invalid unit name
src/login/logind-user.c
src/shared/cgroup-util.c
src/shared/dropin.c
src/shared/generator.c
src/shared/install-printf.c
src/shared/install.c
src/shared/unit-name.c
src/shared/unit-name.h