Пример #1
0
DWORD
LsaInitializeRpcSrv(
    PSTR* ppszRpcSrvName,
    PLSA_RPCSRV_FUNCTION_TABLE* ppFnTable
    )
{
    DWORD dwError = 0;

    pthread_mutex_init(&gSamrSrvDataMutex, NULL);

    dwError = RpcSvcRegisterRpcInterface(samr_v1_0_s_ifspec);
    BAIL_ON_LSA_ERROR(dwError);

    *ppszRpcSrvName = (PSTR)gpszSamrRpcSrvName;
    *ppFnTable      = &gSamrRpcFuncTable;

    dwError = SamrSrvInitialiseConfig(&gSamrSrvConfig);
    BAIL_ON_LSA_ERROR(dwError);

    dwError = SamrSrvReadRegistry(&gSamrSrvConfig);
    BAIL_ON_LSA_ERROR(dwError);

    dwError = SamrSrvInitServerSecurityDescriptor(&gpSamrSecDesc);
    BAIL_ON_LSA_ERROR(dwError);

    bSamrSrvInitialised = TRUE;

cleanup:
    return dwError;

error:
    goto cleanup;
}
Пример #2
0
DWORD
LsaInitializeRpcSrv(
    PSTR* ppszRpcSrvName,
    PLSA_RPCSRV_FUNCTION_TABLE* ppFnTable
    )
{
    DWORD dwError = ERROR_SUCCESS;

    pthread_mutex_init(&gWkssSrvDataMutex, NULL);

    dwError = RpcSvcRegisterRpcInterface(wkssvc_v1_0_s_ifspec);
    BAIL_ON_LSA_ERROR(dwError);

    *ppszRpcSrvName = (PSTR)gpszWkssRpcSrvName;
    *ppFnTable      = &gWkssRpcFuncTable;

    dwError = WkssSrvInitialiseConfig(&gWkssSrvConfig);
    BAIL_ON_LSA_ERROR(dwError);

    dwError = WkssSrvReadRegistry(&gWkssSrvConfig);
    BAIL_ON_LSA_ERROR(dwError);

    dwError = WkssSrvInitServerSecurityDescriptor(&gpWkssSecDesc);
    BAIL_ON_LSA_ERROR(dwError);

    bWkssSrvInitialised = TRUE;

error:
    return dwError;
}