Beispiel #1
0
/*
 * Initialize vmafdd components
 */
DWORD
VmAfdInit(
    VOID
    )
{
    DWORD dwError = 0;

    InitializeGlobals(&gVmafdGlobals);

    dwError = VmAfdVmDirClientInit();
    BAIL_ON_VMAFD_ERROR(dwError);

    dwError = VmAfdLogInitialize(
                    gVmafdGlobals.pszLogFile,
                    gVmafdGlobals.dwMaxOldLogs,
                    gVmafdGlobals.dwMaxLogSize);
    BAIL_ON_VMAFD_ERROR(dwError);

    dwError = InitializeResourceLimit();
    BAIL_ON_VMAFD_ERROR(dwError);

    dwError = VmAfCfgInit();
    BAIL_ON_VMAFD_ERROR(dwError);

    dwError = InitializeDatabase();
    BAIL_ON_VMAFD_ERROR(dwError);

    dwError = InitializeSystemStores();
    BAIL_ON_VMAFD_ERROR (dwError);

    dwError = VmAfdOpenSSLInit();
    BAIL_ON_VMAFD_ERROR (dwError);

    if (gVmafdGlobals.bEnableRPC)
    {
      dwError = VmAfdRpcServerInit();
      BAIL_ON_VMAFD_ERROR(dwError);
    }

    dwError = VmAfdIpcServerInit();
    BAIL_ON_VMAFD_ERROR (dwError);

    // One of the decisions is not  to check return value to prevent failure of AFD because of SL
    dwError = VmAfdSuperLoggingInit(&(gVmafdGlobals.pLogger));
    BAIL_ON_VMAFD_ERROR (dwError);

error:

    return dwError;
}
Beispiel #2
0
/*
 * Initialize vmkdcd components
 */
DWORD
VmKdcInit()
{
    DWORD dwError = 0;
    extern VMKDC_GLOBALS gVmkdcGlobals;

    InitializeGlobals(&gVmkdcGlobals);

#ifndef _WIN32
    dwError = InitializeResourceLimit();
    BAIL_ON_VMKDC_ERROR(dwError);
#endif
    dwError = VmKdcInitKrb5(&gVmkdcGlobals.pKrb5Ctx);
    BAIL_ON_VMKDC_ERROR(dwError);

    dwError = VmKdcSrvOpenServicePort(&gVmkdcGlobals, TRUE, VMKDC_SERVICE_PORT_TCP);
    BAIL_ON_VMKDC_ERROR(dwError);

    dwError = VmKdcSrvOpenServicePort(&gVmkdcGlobals, FALSE, VMKDC_SERVICE_PORT_TCP);
    BAIL_ON_VMKDC_ERROR(dwError);

    dwError = VmKdcSrvOpenServicePort(&gVmkdcGlobals, TRUE, VMKDC_SERVICE_PORT_UDP);
    BAIL_ON_VMKDC_ERROR(dwError);

    dwError = VmKdcSrvOpenServicePort(&gVmkdcGlobals, FALSE, VMKDC_SERVICE_PORT_UDP);
    BAIL_ON_VMKDC_ERROR(dwError);

    dwError = VmKdcSrvServicePortListen(&gVmkdcGlobals);
    BAIL_ON_VMKDC_ERROR(dwError);

#if 0
    dwError = VmKdcRpcServerInit();
    BAIL_ON_VMKDC_ERROR(dwError);
#endif

    dwError = VmKdcInitConnAcceptThread(&gVmkdcGlobals);
    BAIL_ON_VMKDC_ERROR(dwError);

    VMDIR_LOG_INFO(VMDIR_LOG_MASK_ALL, "VmKdcInit: done!");

error:
    return dwError;
}