using group_iterator = groupstream::iteratorIterator for groupstream.
using user_iterator = userstream::iteratorIterator for userstream.
using group_type = struct ::group
Alias to group system type.
System user group.
group system type.
group, because it contains byte buffer that stores all the fields.
public group_typeusing iterator = cstring_iterator< char * >Group member iterator type.
operator!=(const group & rhs) const -> boolCompare group IDs.
operator==(const group & rhs) const -> boolCompare group IDs.
size() const -> size_tCount group members.
end() const -> iteratorGet iterator to the end of group members.
begin() const -> iteratorGet iterator to the beginning of group members.
id() const -> gid_typeGet group ID.
password() const -> const char *Get group password.
name() const -> const char *Get group name.
operator=(const group_type & rhs) -> group &Assignment.
operator=(const group &) -> group &Assignment.
~group()group(group &&)Move-constructor.
group(const group &)Copy-constructor.
group()
Find group in system database by name name and store in result.
Find group in system database by id id and store in result.
Print group in /etc/group format.
System user.
passwd system type.
passwd, because it contains byte buffer that stores all the fields.
public passwd_typeoperator!=(const user & rhs) const -> boolCompare user IDs.
operator==(const user & rhs) const -> boolCompare user IDs.
shell() const -> const char *Get user shell.
home() const -> const char *Get user home directory.
real_name() const -> const char *Get user real name.
group_id() const -> gid_typeGet user primary group ID.
id() const -> uid_typeGet user ID.
password() const -> const char *Get user password.
name() const -> const char *Get user name.
operator=(const passwd_type & rhs) -> user &Assignment.
operator=(const user & rhs) -> user &Assignment.
~user()user(const user &)Copy-constructor.
user(user &&)Move-constructor.
user()
Find user in system database by name name and store in result.
Find user in system database by id id and store in result.
Print user in /etc/passwd format.
Input stream of system users. Useful to traverse all system users in conjunction with user_iterator.
using const_pointer = const value_type *using pointer = value_type *using const_reference = const value_type &using reference = value_type &using value_type = userusing iterator = basic_istream_iterator< userstream, user >close() -> voidopen() -> voidend() -> iteratorbegin() -> iteratoroperator>>(reference rhs) -> userstream &Read the next user from the stream.
operator!() const -> boolReturns true if the end of stream is reached.
operator bool() constexplicitReturns true if the end of stream is not reached.
~userstream()userstream()Input stream of system groups. Useful to traverse all system groups in conjunction with group_iterator.
using const_pointer = const value_type *using pointer = value_type *using const_reference = const value_type &using reference = value_type &using value_type = groupusing iterator = basic_istream_iterator< groupstream, group >close() -> voidopen() -> voidend() -> iteratorbegin() -> iteratoroperator>>(reference rhs) -> groupstream &Read the next group from the stream.
operator!() const -> boolReturns true if the end of stream is reached.
operator bool() constexplicitReturns true if the end of stream is not reached.
~groupstream()groupstream()
Find group in system database by id id and store in result.
operator<<(std::ostream & out, const user & rhs) -> std::ostream &
Print user in /etc/passwd format.
Find user in system database by id id and store in result.
find_user(const char * name, user & result) -> bool
Find user in system database by name name and store in result.
find_group(const char * name, group & result) -> bool
Find group in system database by name name and store in result.
operator<<(std::ostream & out, const group & rhs) -> std::ostream &
Print group in /etc/group format.