void TestAuthErr() {
  EscalateHelper *helper = NULL;
  GIOChannel *stdin_writer = NULL;
  GIOChannel *stdout_reader = NULL;
  GThread *helper_thread = NULL;

  EscalateTestSetIds(100, 0, 100, 0);
  EscalateTestMockAuthenticate(auth_err_prompts, PAM_AUTH_ERR);

  CreateHelper(&helper, &stdin_writer, &stdout_reader);
  helper_thread = RunHelperThread(helper);

  WriteMessage(stdin_writer,
               "(1, <(1, 0, 'janedoe', {3: @ms '/dev/pts/9000'})>)");
  AssertMessage(stdout_reader, "(2, <(1, 'Password: '******'testpass', 0)>)");
  AssertMessage(stdout_reader, "(2, <(4, 'Failed!')>)");
  WriteMessage(stdin_writer, "(3, <(@ms nothing, 0)>)");
  AssertMessage(stdout_reader, "(4, <(7,)>)");

  JoinHelperThread(helper_thread);
  EscalateHelperFree(helper);
  g_io_channel_unref(stdin_writer);
  g_io_channel_unref(stdout_reader);
}
Exemplo n.º 2
0
ON__IDefLayerSettingsUserData::ON__IDefLayerSettingsUserData()
{
  m_userdata_uuid = ON__IDefLayerSettingsUserData::m_ON__IDefLayerSettingsUserData_class_id.Uuid();
  m_application_uuid = ON_opennurbs_id;
  m_userdata_copycount = 1;
  CreateHelper();
}
Exemplo n.º 3
0
ON__IDefAlternativePathUserData::ON__IDefAlternativePathUserData()
{
  m_userdata_uuid = ON__IDefAlternativePathUserData::m_ON__IDefAlternativePathUserData_class_id.Uuid();
  m_application_uuid = ON_opennurbs_id;
  m_userdata_copycount = 1;
  CreateHelper();
}
Exemplo n.º 4
0
ON__IDefLayerSettingsUserData::ON__IDefLayerSettingsUserData(const ON__IDefLayerSettingsUserData& src)
: ON_UserData(src)
{
  m_userdata_uuid = ON__IDefLayerSettingsUserData::m_ON__IDefLayerSettingsUserData_class_id.Uuid();
  m_application_uuid = ON_opennurbs_id;
  CreateHelper();
  CopyHelper(src);
}
Exemplo n.º 5
0
ON__IDefAlternativePathUserData::ON__IDefAlternativePathUserData(const ON__IDefAlternativePathUserData& src)
: ON_UserData(src)
{
  m_userdata_uuid = ON__IDefAlternativePathUserData::m_ON__IDefAlternativePathUserData_class_id.Uuid();
  m_application_uuid = ON_opennurbs_id;
  CreateHelper();
  CopyHelper(src);
}
Exemplo n.º 6
0
HRESULT CSubtitleInputPin::CompleteConnect(IPin* pReceivePin)
{
    CAutoLock cAutoLock(m_pSubLock);
    XY_LOG_DEBUG(XY_LOG_VAR_2_STR(pReceivePin));
    delete m_helper; m_helper = NULL;
    m_helper = CreateHelper(m_mt, pReceivePin);
    if (!m_helper)
    {
        XY_LOG_ERROR("Failed to Create helper. ");
        return E_FAIL;
    }
    AddSubStream(m_helper->GetSubStream());

    return __super::CompleteConnect(pReceivePin);
}
static void TestWrongUser() {
  EscalateHelper *helper = NULL;
  GIOChannel *stdin_writer = NULL;
  GIOChannel *stdout_reader = NULL;
  GThread *helper_thread = NULL;

  EscalateTestSetIds(101, 0, 101, 0);
  EscalateTestMockAuthenticate(auth_wrong_user_prompts, PAM_AUTH_ERR);

  CreateHelper(&helper, &stdin_writer, &stdout_reader);
  helper_thread = RunHelperThread(helper);

  WriteMessage(stdin_writer,
               "(1, <(1, 0, 'janedoe', {3: @ms '/dev/pts/9000'})>)");
  AssertMessage(stdout_reader, "(4, <(4,)>)");

  JoinHelperThread(helper_thread);
  EscalateHelperFree(helper);
  g_io_channel_unref(stdin_writer);
  g_io_channel_unref(stdout_reader);
}
Exemplo n.º 8
0
CUnBitArray::CUnBitArray(CIO * pIO, int nVersion)
{
	CreateHelper(pIO, 16384, nVersion);
	m_nFlushCounter = 0;
	m_nFinalizeCounter = 0;
}
bool
GLSLProgram::Create(char *file0, char *file1, char *file2, char *file3, char * file4, char *file5)
{
	return CreateHelper(file0, file1, file2, file3, file4, file5, NULL);
}