Do not redefine system group and passwd functions for testsudoers.
Instead, prefix the replacements with "testsudoers_" and use a custom pwutil backend so they get used.
This commit is contained in:
14
plugins/sudoers/testsudoers_pwutil.c
Normal file
14
plugins/sudoers/testsudoers_pwutil.c
Normal file
@@ -0,0 +1,14 @@
|
||||
/* Use custom passwd/group functions with the normal pwutil_impl.c */
|
||||
#define sudo_make_pwitem testsudoers_make_pwitem
|
||||
#define sudo_make_gritem testsudoers_make_gritem
|
||||
#define sudo_make_gidlist_item testsudoers_make_gidlist_item
|
||||
#define sudo_make_grlist_item testsudoers_make_grlist_item
|
||||
|
||||
#define getpwnam testsudoers_getpwnam
|
||||
#define getpwuid testsudoers_getpwuid
|
||||
#define getgrnam testsudoers_getgrnam
|
||||
#define getgrgid testsudoers_getgrgid
|
||||
#define sudo_getgrouplist2_v1 testsudoers_getgrouplist2_v1
|
||||
|
||||
#include "tsgetgrpw.h"
|
||||
#include "pwutil_impl.c"
|
Reference in New Issue
Block a user