Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibC: Don't clear static storage during
endgrent
The POSIX documentation for `endgrent` only mentions that it "closes the group database", not that it clears the backing storage for return values. This means that applications might make use of the returned values even after closing the group database itself. This includes our own implementations for `getgrnam` and `getgrgid`. The specification also states that "the storage areas might be overwritten by a subsequent call to `getgrgid`, `getgrnam`, or `getgrent`". This implies that `getgrgid` and `getgrnam` aren't meant to have their own static storage and instead rely on the storage of `getgrent`.
- Loading branch information