Beispiel #1
0
int
open_session_main(
    int argc,
    char *argv[]
)
{
    DWORD dwError = 0;

    HANDLE hLsaConnection = NULL;
    PTESTDATA pTestData = NULL;

    dwError = Lwt_LsaTestSetup(
                  argc,
                  argv,
                  &hLsaConnection,
                  &pTestData);
    if ( dwError )
        goto error;

    dwError = Lwt_LsaOpenSession(hLsaConnection, pTestData);
    if ( dwError )
        goto error;

cleanup:

    Lwt_LsaTestTeardown(&hLsaConnection, &pTestData);

    return LwtMapErrorToProgramStatus(dwError);

error:
    goto cleanup;
}
int
find_user_by_name_main(
    int argc, 
    char *argv[]
    )
{
    DWORD dwError = LW_ERROR_SUCCESS;
    HANDLE hLsaConnection = NULL;
    PTESTDATA pTestData = NULL;

    dwError = Lwt_LsaTestSetup( argc,
                                argv,
                                &hLsaConnection,
                                &pTestData);
    if ( dwError )
    {
        goto error;
    }

    dwError = Lwt_LsaFindUserByName( hLsaConnection, 
                                     pTestData);
    BAIL_ON_TEST_BROKE(dwError);

cleanup:

    Lwt_LsaTestTeardown( &hLsaConnection, 
                         &pTestData);

    return LwtMapErrorToProgramStatus(dwError);

error:
    goto cleanup;
}
int 
test_local_provider_main(
    int argc, 
    char *argv[]
    )
{
    DWORD dwError = LW_ERROR_SUCCESS;

    HANDLE hLsaConnection = NULL;
    PTESTDATA pTestData = NULL;

    dwError = Lwt_LsaTestSetup(argc, argv, &hLsaConnection, &pTestData);
    if ( dwError )
        goto error;

    dwError = Lwt_LsaTestLocalProvider(hLsaConnection);
    if ( dwError )
        goto error;

cleanup:

    Lwt_LsaTestTeardown(&hLsaConnection, &pTestData);

    return LwtMapErrorToProgramStatus(dwError);

error:
    goto cleanup;

}
Beispiel #4
0
int 
enum_users_main(
    int argc, 
    char *argv[]
    )
{
    DWORD dwError = 0;
    HANDLE hLsaConnection = NULL;
    PTESTDATA pTestData = NULL;
   
    dwError = Lwt_LsaTestSetup(
                   argc,
                   argv,
                   &hLsaConnection,
                   &pTestData);
    if ( dwError )
        goto error;

    dwError = Lwt_LsaEnumUsers(hLsaConnection, pTestData);
    if ( dwError )
        goto error;

    dwError = ValidateEnumUsersForInvalidData(
        hLsaConnection,
        pTestData);

    if (dwError)
        goto error;

cleanup:

    Lwt_LsaTestTeardown(&hLsaConnection, &pTestData);
    return LwtMapErrorToProgramStatus(dwError);

error:
    goto cleanup;
}