Commit graph

3 commits

Author SHA1 Message Date
Kenneth Myhra
1fb8408aa2 LibCore: Do not leak FILE pointer in Group::add_group()
By using a ScopeGuard we make sure that we always close the FILE, also
on early returns.
2022-01-21 18:34:24 +01:00
Kenneth Myhra
6df3fdd83f LibCore: Use generic AK_OS_BSD_GENERIC to hide Group::add_group()
This hides the method Group::add_group() on both MacOS and OpenBSD since
the function putgrent(), which is essential for add_group() to work, is
not available on these OSes.
2022-01-21 18:34:24 +01:00
Kenneth Myhra
a99b50ce8c LibCore: Add Core::Group abstraction for group management :^)
This adds the Core::Group C++ abstraction to ease interaction with the
group entry database, as well as represent the Group entry.

Core::Group abstraction currently contains the following functionality:
- Add a group entry - 'Core::Group::add_group()'
2022-01-16 11:19:07 +01:00