UserId class final

A user id that names one real user: never one the kernel uses to say it does not know the user.

parse refuses:

  • 65534, the overflow uid Linux reports for a user unmapped in the reader's user namespace, and Linux's nobody;
  • 4294967294, macOS's nobody;
  • 4294967295, (uid_t)-1, which Linux reports for a peer with no credentials;
  • anything outside uid_t's 32 bits, which includes -2 and -1, the signed forms of the two above that tools such as macOS's id -u nobody print.

So none of them can be in an allow list built from UserIds.

Properties

hashCode → int
The hash code for this object.
no setteroverride
number → int
The id as the kernel writes it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

parse(int number) → UserId?
number as a user id; null when it is negative, wider than 32 bits, or one of refused.

Constants

refused → const Set<int>
The ids parse refuses inside uid_t's range.