astrid-runtime/astrid · error

FUSE service parent start identity is required on Linux

Error message

FUSE service parent start identity is required on Linux

What it means

On Linux, `start_identity` is mandatory: the helper uses it to verify the parent's start context (e.g. process start identity) so a rogue process cannot impersonate the parent. Launching without it on Linux always fails validation.

Source

Thrown at crates/astrid-storage-provider-fuse/src/service.rs:199

    parent: &astrid_core::storage_filesystem::StorageProviderParentLifetimeV1,
) -> Result<()> {
    if parent.pid <= 1 || parent.pid == std::process::id() {
        bail!("invalid FUSE service parent PID");
    }
    if parent.token.len() < 16
        || parent.token.len() > 512
        || parent.token.chars().any(char::is_control)
    {
        bail!("invalid FUSE service parent token");
    }
    if let Some(identity) = parent.start_identity.as_deref()
        && (identity.is_empty() || identity.len() > 512 || identity.chars().any(char::is_control))
    {
        bail!("invalid FUSE service parent start identity");
    }
    #[cfg(target_os = "linux")]
    if parent.start_identity.is_none() {
        bail!("FUSE service parent start identity is required on Linux");
    }
    Ok(())
}

fn validate_lease(lease: &StorageMountLeaseV1) -> Result<()> {
    if lease.lease_token.len() < 16
        || lease.lease_token.len() > 4096
        || lease.lease_token.chars().any(char::is_control)
    {
        bail!("invalid FUSE callback token");
    }
    let now = SystemTime::now()
        .duration_since(UNIX_EPOCH)
        .context("read system clock")?
        .as_secs();
    if lease.expires_at_epoch_secs < now {
        bail!("FUSE lease is expired");
    }

View on GitHub (pinned to affd8760f4)

Solutions

  1. Always populate `start_identity` on Linux (e.g. /proc-derived start identifier of the parent process).
  2. Feature-gate client code so Linux paths set the identity before launching the helper.
  3. Upgrade the client/mount library so the launch descriptor includes the field on Linux.
  4. In tests or tools targeting Linux, supply a synthetic but valid identity string.

Example fix

// before
let parent = StorageProviderParentLifetimeV1 { pid, token, start_identity: None, .. };
// after
let parent = StorageProviderParentLifetimeV1 { pid, token, start_identity: Some(parent_start_identity()), .. };
Defensive patterns

Strategy: validation

Validate before calling

#[cfg(target_os = "linux")]
if parent.start_identity.is_none() {
    return Err("start_identity is required on Linux");
}

Type guard

fn linux_parent_ready(parent: &StorageProviderParentLifetimeV1) -> bool {
    #[cfg(target_os = "linux")]
    { parent.start_identity.is_some() }
    #[cfg(not(target_os = "linux"))]
    { true }
}

Prevention

When it happens

Trigger: `validate_parent` runs under `#[cfg(target_os = "linux")]` and finds `parent.start_identity.is_none()` while building the launch in `validate_launch`.

Common situations: Cross-platform code that only sets start_identity on macOS/Windows; older client versions predating the field; a caller that treats the field as optional everywhere.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/569f8122a88b38cb. Report an issue: GitHub.