Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
mock-getpwuid_r.c File Reference

(/usr/bin/git 2025-02-19, commit: 5f1bbfa)

Implementation of a mock function for getpwnam_r(). More...

#include "mock-getpwuid_r.h"
#include <string.h>
#include <sys/types.h>
#include "common.h"
#include "unit_test.h"
Include dependency graph for mock-getpwuid_r.c:

Functions

int __wrap_getpwuid_r (uid_t uid, struct passwd *__restrict resultbuf, char *__restrict buffer, size_t buflen, struct passwd **__restrict result)
 

Detailed Description

Implementation of a mock function for getpwnam_r().

Function Documentation

◆ __wrap_getpwuid_r()

int __wrap_getpwuid_r ( uid_t  uid,
struct passwd *__restrict  resultbuf,
char *__restrict  buffer,
size_t  buflen,
struct passwd **__restrict  result 
)

Mock function for getpwuid_r().

Checks that the right parameters are given and return a preset value.