summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/Group.cpp
AgeCommit message (Collapse)Author
2023-02-25LibCore+Utilities: Replace uses of strpbrk with find_any_of()Andrew Kaster
We don't need to use scary C string POSIX APIs when we have nicer ones on String/DeprecatedString.
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2023-01-13LibCore: Call the mkstemp function in a slightly prettier wayArda Cinar
This removes a FIXME, although the new version isn't less char-pointery.
2022-12-14LibCore: Protect Core::Group against null group::gr_mem membersTimothy Flynn
Serenity's implementation does not set this pointer to anything, so we should not assume it was set.
2022-12-14LibCore: Define and use a fallible, OS-independent getgrent(_r) wrapperTimothy Flynn
Rather than maintaining a list of #ifdef guards to check systems that do not provide the reentrant version of getgrent, we can use C++ concepts to let the compiler perform this check for us. While we're at it, we can also provide this wrapper as fallible to let the caller TRY calling it.
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-25LibCore: Sync groups, getgrent to getgrent_r, fix gr_mem bugne0ndrag0n
2022-11-13LibCore: Add query for all accounts and groupsne0ndrag0n
2022-07-19LibCore: Add support for compiling for Android with API Version >= 30Andrew Kaster
Most changes are around user and group management, which are exposed in the Android NDK differently than other Unices. We require version 30 for memfd_create, version 28 for posix_spawn, and so on. It's possible a shim for memfd_create could be used, but since Google is mandating new apps use API level 30 as of Nov 2022, this seems suitable.
2022-06-30Everywhere: Use my fairly new and shiny serenityos.org email :^)Kenneth Myhra
2022-01-21LibCore: Do not leak FILE pointer in Group::add_group()Kenneth Myhra
By using a ScopeGuard we make sure that we always close the FILE, also on early returns.
2022-01-21LibCore: Use generic AK_OS_BSD_GENERIC to hide Group::add_group()Kenneth Myhra
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-16LibCore: Add Core::Group abstraction for group management :^)Kenneth Myhra
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()'