Crate redox_users[][src]

redox-users is designed to be a small, low-ish level interface to system user and group information, as well as user password authentication.

Permissions

Because this is a system level tool dealing with password authentication, programs are often required to run with escalated priveleges. The implementation of the crate is privelege unaware. The only privelege requirements are those laid down by the system administrator over these files:

  • /etc/group
    • Read: Required to access group information
    • Write: Required to change group information
  • /etc/passwd
    • Read: Required to access user information
    • Write: Required to change user information
  • /etc/shadow
    • Read: Required to authenticate users
    • Write: Required to set user passwords

Reimplementation

This crate is designed to be as small as possible without sacrificing critical functionality. The idea is that a small enough redox-users will allow easy re-implementation based on the same flexible API. This would allow more complicated authentication schemes for redox in future without breakage of existing software.

Structs

AllGroups

Struct encapsulating all the groups on the system

AllUsers

Struct encapsulating all users on the system

Group

A struct representing a Redox users group. Currently maps to an '/etc/group' file entry.

User

A struct representing a Redox user. Currently maps to an entry in the '/etc/passwd' file.

Enums

UsersError

Errors that might happen while using this crate

Functions

get_egid

Gets the current process effective group ID.

get_euid

Gets the current process effective user ID.

get_gid

Gets the current process real group ID.

get_uid

Gets the current process real user ID.

Type Definitions

Result