You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
625 B
31 lines
625 B
4 years ago
|
#include "mock/linux.hpp"
|
||
|
#include "util/wrap.hpp"
|
||
4 years ago
|
|
||
|
extern "C"
|
||
|
{
|
||
|
|
||
|
static webfused_test::ILinux * wfd_MockLinux = nullptr;
|
||
|
|
||
|
WFD_WRAP_FUNC0( wfd_MockLinux, uid_t, getuid);
|
||
|
WFD_WRAP_FUNC1( wfd_MockLinux, struct group *, getgrnam, char const *);
|
||
|
WFD_WRAP_FUNC1( wfd_MockLinux, int, setgid, gid_t);
|
||
|
WFD_WRAP_FUNC2( wfd_MockLinux, int, setgroups, int, gid_t *);
|
||
|
WFD_WRAP_FUNC1( wfd_MockLinux, struct passwd *, getpwnam, char const *);
|
||
|
WFD_WRAP_FUNC1( wfd_MockLinux, int, setuid, uid_t);
|
||
|
|
||
|
}
|
||
|
|
||
|
namespace webfused_test
|
||
|
{
|
||
|
|
||
|
MockLinux::MockLinux()
|
||
|
{
|
||
|
wfd_MockLinux = this;
|
||
|
}
|
||
|
|
||
|
MockLinux::~MockLinux()
|
||
|
{
|
||
|
wfd_MockLinux = nullptr;
|
||
|
}
|
||
|
|
||
|
}
|