2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Prefix all libc replacements with sudo_ and #define the real name

to the sudo_ version.  That way we don't pollute the libc namespace.
This commit is contained in:
Todd C. Miller
2014-06-26 15:51:08 -06:00
parent 4d37a4a162
commit 87c2fe5a31
29 changed files with 173 additions and 127 deletions

View File

@@ -54,7 +54,7 @@
* BSD-compatible getgrouplist(3) using AIX getgrset(3)
*/
int
getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroupsp)
sudo_getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroupsp)
{
char *cp, *grset = NULL;
int ngroups = 1;
@@ -276,7 +276,7 @@ done:
* BSD-compatible getgrouplist(3) using nss_search(3)
*/
int
getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroupsp)
sudo_getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroupsp)
{
struct nss_groupsbymem gbm;
static DEFINE_NSS_DB_ROOT(db_root);
@@ -315,7 +315,7 @@ getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroupsp)
* BSD-compatible getgrouplist(3) using getgrent(3)
*/
int
getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroupsp)
sudo_getgrouplist(const char *name, gid_t basegid, gid_t *groups, int *ngroupsp)
{
int i, ngroups = 1;
int grpsize = *ngroupsp;