test-nss-users: add new nss test that resolves users and groups
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1929936. This is similar to test-nss-hosts, but does users, groups, uid, gids. Functions tested are: _nss_*_getpwnam_r _nss_*_getgrnam_r _nss_*_getpwgid_r _nss_*_getgrgid_r Other entry points should be tested too, but it's not relevant to the bug I was investigating, so I'm leaving that for later ;)
This commit is contained in:
@@ -213,3 +213,25 @@ typedef enum nss_status (*_nss_gethostbyaddr_r_t)(
|
||||
struct hostent *host,
|
||||
char *buffer, size_t buflen,
|
||||
int *errnop, int *h_errnop);
|
||||
|
||||
typedef enum nss_status (*_nss_getpwnam_r_t)(
|
||||
const char *name,
|
||||
struct passwd *pwd,
|
||||
char *buffer, size_t buflen,
|
||||
int *errnop);
|
||||
typedef enum nss_status (*_nss_getpwuid_r_t)(
|
||||
uid_t uid,
|
||||
struct passwd *pwd,
|
||||
char *buffer, size_t buflen,
|
||||
int *errnop);
|
||||
|
||||
typedef enum nss_status (*_nss_getgrnam_r_t)(
|
||||
const char *name,
|
||||
struct group *gr,
|
||||
char *buffer, size_t buflen,
|
||||
int *errnop);
|
||||
typedef enum nss_status (*_nss_getgrgid_r_t)(
|
||||
gid_t gid,
|
||||
struct group *gr,
|
||||
char *buffer, size_t buflen,
|
||||
int *errnop);
|
||||
|
||||
Reference in New Issue
Block a user