Sys.Linux.Nss.Passwd (Hyper v0.1.0)

Copy Markdown View Source

The passwd database (getent passwd).

Summary

Functions

Queries the system for passwd entries.

Parse raw getent passwd output into specs, halting on the first bad line.

Functions

entries()

@spec entries() ::
  {:ok, [Sys.Linux.Nss.Passwd.Spec.t()]}
  | {:error,
     {:getent_failed, non_neg_integer()} | :getent_unavailable | :invalid_format}

Queries the system for passwd entries.

from_output(output)

@spec from_output(binary()) ::
  {:ok, [Sys.Linux.Nss.Passwd.Spec.t()]} | {:error, :invalid_format}

Parse raw getent passwd output into specs, halting on the first bad line.