openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/rsyslog/8.1903.0-r0/rsyslog-8.1903.0/runtime/rsconf.c
static rsRetVal tellModulesActivateConfigPrePrivDrop(void)
{
    cfgmodules_etry_t* node;
    rsRetVal localRet;

    DBGPRINTF("telling modules to activate config (before dropping privs) %p\n",
              runConf);
    node = module.GetNxtCnfType(runConf, NULL, eMOD_ANY);
    while (node != NULL)
    {
        if (node->pMod->beginCnfLoad != NULL &&
            node->pMod->activateCnfPrePrivDrop != NULL && node->canActivate)
        {
            DBGPRINTF("pre priv drop activating config %p for module %s\n",
                      runConf, node->pMod->pszName);
            localRet = node->pMod->activateCnfPrePrivDrop(node->modCnf);
            if (localRet != RS_RET_OK)
            {
                LogError(0, localRet, "activation of module %s failed",
                         node->pMod->pszName);
                node->canActivate = 0; /* in a sense, could not activate... */
            }
        }
        node = module.GetNxtCnfType(runConf, node, eMOD_ANY);
    }

    return RS_RET_OK; /* intentional: we do not care about module errors */
}
/* Tell modules to activate current running config (pre privilege drop) */
Tell modules to activate current running config (pre privilege drop)
Tell modules to activate current running config ( pre privilege drop )
static rsRetVal tellModulesActivateConfigPrePrivDrop(void)
{
    cfgmodules_etry_t* node;
    rsRetVal localRet;
    DBGPRINTF("telling modules to activate config (before dropping privs) %p\n",
              runConf);
    node = module.GetNxtCnfType(runConf, NULL, eMOD_ANY);
    while (node != NULL)
    {
        if (node->pMod->beginCnfLoad != NULL &&
            node->pMod->activateCnfPrePrivDrop != NULL && node->canActivate)
        {
            DBGPRINTF("pre priv drop activating config %p for module %s\n",
                      runConf, node->pMod->pszName);
            localRet = node->pMod->activateCnfPrePrivDrop(node->modCnf);
            if (localRet != RS_RET_OK)
            {
                LogError(0, localRet, "activation of module %s failed",
                         node->pMod->pszName);
                node->canActivate = 0; 
            }
        }
        node = module.GetNxtCnfType(runConf, node, eMOD_ANY);
    }
    return RS_RET_OK; 
}
static rsRetVal tellModulesActivateConfigPrePrivDrop ( void ) { cfgmodules_etry_t * node ; rsRetVal localRet ; DBGPRINTF ( " \n " , runConf ) ; node = module . GetNxtCnfType ( runConf , NULL , eMOD_ANY ) ; while ( node != NULL ) { if ( node -> pMod -> beginCnfLoad != NULL && node -> pMod -> activateCnfPrePrivDrop != NULL && node -> canActivate ) { DBGPRINTF ( " \n " , runConf , node -> pMod -> pszName ) ; localRet = node -> pMod -> activateCnfPrePrivDrop ( node -> modCnf ) ; if ( localRet != RS_RET_OK ) { LogError ( 0 , localRet , " " , node -> pMod -> pszName ) ; node -> canActivate = 0 ; } } node = module . GetNxtCnfType ( runConf , node , eMOD_ANY ) ; } return RS_RET_OK ; }
Tell modules to activate current running config (pre privilege drop)
Tell modules to activate current running config ( pre privilege drop )
/* in a sense, could not activate... */ /* intentional: we do not care about module errors */