2020-03-20 12:48:58 +00:00
|
|
|
#include "mock/pam.hpp"
|
2020-03-20 13:02:38 +00:00
|
|
|
#include "util/wrap.hpp"
|
2020-03-19 20:53:49 +00:00
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
static webfused_test::IPam * wfd_MockPam = nullptr;
|
|
|
|
|
2020-03-20 13:02:38 +00:00
|
|
|
WFD_WRAP_FUNC4(wfd_MockPam, int, pam_start, char const *, char const *, struct pam_conv const *, pam_handle_t **);
|
|
|
|
WFD_WRAP_FUNC2(wfd_MockPam, int, pam_end, pam_handle_t *, int);
|
|
|
|
WFD_WRAP_FUNC2(wfd_MockPam, int, pam_authenticate, pam_handle_t *, int);
|
|
|
|
WFD_WRAP_FUNC2(wfd_MockPam, int, pam_acct_mgmt, pam_handle_t *, int);
|
|
|
|
WFD_WRAP_FUNC2(wfd_MockPam, char const *, pam_strerror, pam_handle_t *, int);
|
2020-03-19 20:53:49 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace webfused_test
|
|
|
|
{
|
|
|
|
|
|
|
|
MockPam::MockPam()
|
|
|
|
{
|
|
|
|
wfd_MockPam = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
MockPam::~MockPam()
|
|
|
|
{
|
|
|
|
wfd_MockPam = nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|