| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
POSIX specifies that the get{pw,gr}*_r() functions store a NULL pointer
to *result on error. However, OpenBSD does not always do this[1][2]:
> if (bufsize < GETGR_R_SIZE_MAX)
> return ERANGE;
Work around it by explicitly initializing ret to NULL.
[1]: https://github.com/openbsd/src/blob/e4829a9cc666f01ca5062d7fc15c20ab2d69229e/lib/libc/gen/getgrent.c#L135-L136
[2]: https://github.com/openbsd/src/blob/e4829a9cc666f01ca5062d7fc15c20ab2d69229e/lib/libc/gen/getgrent.c#L183-L184
|
| |
|
|
|
|
|
| |
They tend be 1024, which is a lot of memory per user/group. 128 is
usually enough, so start there instead.
|
| |
|
| |
|
|
|
|
| |
In anticipation of C23, since those headers won't be necessary any more.
|
|
|
|
|
|
|
| |
And while I'm at it, remove years from copyright declarations.
Link: https://spdx.dev/about/
Link: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/
|
|
|
|
|
|
| |
This fixes (admittedly uncommon) commands like
$ bfs -nouser -exec add-missing-user.sh {} \;
|
|
|
|
|
|
|
| |
Iterating all the users/groups can be expensive, especially with NSS.
Android has so many that it doesn't even return them all from
get{pw,gr}ent() for performance reasons, leading to incorrect behaviour
of -user/-group/etc.
|
|
Moved Source Files Into `src` Folder
|