Roux.Blob.TrustError exception (roux v0.2.2)

Copy Markdown View Source

Raised by Roux.Blob.open!/1 (and returned by Roux.Blob.open/1) for a store whose files another user could have written: a root, or its FORMAT file, that the current OS user does not own or that is writable by its group or by everyone.

A store's entries are decoded as the manifest's are, trusting that this tool wrote them for this user; that trust is only as good as the store's ownership and permissions. See Roux.Blob ("Trust").

Summary

Types

Why the path is not trusted: :not_owner (another user owns it), :writable_by_others (group- or world-writable), or :not_a_directory / :not_a_regular_file (the root, or its FORMAT, is something else, a symbolic FORMAT among them).

t()

Types

reason()

@type reason() ::
  :not_owner | :writable_by_others | :not_a_directory | :not_a_regular_file

Why the path is not trusted: :not_owner (another user owns it), :writable_by_others (group- or world-writable), or :not_a_directory / :not_a_regular_file (the root, or its FORMAT, is something else, a symbolic FORMAT among them).

t()

@type t() :: %Roux.Blob.TrustError{
  __exception__: true,
  mode: non_neg_integer() | nil,
  owner: non_neg_integer() | nil,
  path: Path.t(),
  reason: reason(),
  user: non_neg_integer() | nil
}