Skip to main content

validate_standalone_socket_path

Function validate_standalone_socket_path 

Source
pub fn validate_standalone_socket_path(path: &Path) -> Result<(), String>
Expand description

Validate a StandaloneConfig::socket_path.

Rules:

  1. Absolute path (starts with /).
  2. Lives under /run/ (rejects /etc/..., /tmp/..., etc. — pins the socket to a tmpfs path predictably writable by the standalone daemon). Runtime adapters can explicitly bypass this restriction for development.
  3. No .. segments anywhere in the path.