design: mkName accepts any non-empty text — define allowed charset for service/process/profile names #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
`IR.Domain.Error.mkName` rejects only the empty string. `ServiceName "docker; rm -rf /"`, names with newlines, NULs, or path separators are all constructively "valid" and flow downstream to the dinit control socket / Nix layer via the Executor.
The whole point of the smart-constructor layer is that invalid states are unrepresentable — right now "valid name" is defined as "non-empty", which is far weaker than what dinit unit names, /proc comm names (15-byte truncation!), and profile names actually permit.
Define per-type rules, e.g.:
Bonus: `mkInterval` in IR.Domain.Error appears unused (IR.ObserveStrategy.mkIntervalMs reimplements it) — drop or reuse.