diff options
Diffstat (limited to 'meta-networking/recipes-daemons/opensaf/opensaf')
16 files changed, 587 insertions, 276 deletions
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Catch-std-ifstream-failure-by-reference.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Catch-std-ifstream-failure-by-reference.patch deleted file mode 100644 index 30fdb8bf14..0000000000 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Catch-std-ifstream-failure-by-reference.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 38c5343f84799fc5041575f3ec808f7476b6eea3 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 16 Apr 2018 14:33:35 -0700 -Subject: [PATCH] Catch std::ifstream::failure by reference - -Fixes -error: catching polymorphic type 'class std::ios_base::failure' by value -[-Werror=catch-value=] - } catch (std::ofstream::failure) { - ^~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - src/base/conf.cc | 4 ++-- - src/dtm/dtmnd/dtm_main.cc | 2 +- - src/dtm/dtmnd/multicast.cc | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/base/conf.cc b/src/base/conf.cc -index d5755a1..4820357 100644 ---- a/src/base/conf.cc -+++ b/src/base/conf.cc -@@ -189,7 +189,7 @@ std::string Conf::ReadFile(const std::string& path_name, - try { - str.open(path_name); - str >> contents; -- } catch (std::ifstream::failure) { -+ } catch (std::ifstream::failure& e) { - contents.clear(); - } - return (str.fail() || contents.empty()) ? default_contents : contents; -@@ -203,7 +203,7 @@ void Conf::WriteFileAtomically(const std::string& path_name, - try { - str.open(tmp_file, std::ofstream::out | std::ofstream::trunc); - str << contents << std::endl; -- } catch (std::ofstream::failure) { -+ } catch (std::ofstream::failure& e) { - success = false; - } - str.close(); -diff --git a/src/dtm/dtmnd/dtm_main.cc b/src/dtm/dtmnd/dtm_main.cc -index 585e11e..5cf6ad7 100644 ---- a/src/dtm/dtmnd/dtm_main.cc -+++ b/src/dtm/dtmnd/dtm_main.cc -@@ -367,7 +367,7 @@ void UpdateNodeIdFile(DTM_INTERNODE_CB *cb) { - try { - str.open(PKGLOCALSTATEDIR "/node_id", std::ofstream::out); - str << std::hex << node_id << std::endl; -- } catch (std::ofstream::failure) { -+ } catch (std::ofstream::failure& e) { - } - str.close(); - } -diff --git a/src/dtm/dtmnd/multicast.cc b/src/dtm/dtmnd/multicast.cc -index cadc002..7c25fea 100644 ---- a/src/dtm/dtmnd/multicast.cc -+++ b/src/dtm/dtmnd/multicast.cc -@@ -199,7 +199,7 @@ bool Multicast::GetPeersFromFile(const std::string &path_name) { - } - } - } -- } catch (std::ifstream::failure) { -+ } catch (std::ifstream::failure& e) { - LOG_ER("Caught std::ifstream::failure when reading file '%s', peers=%zu", - path_name.c_str(), static_cast<size_t>(peers_.size())); - peers_.clear(); diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-build-with-fno-common.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-build-with-fno-common.patch new file mode 100644 index 0000000000..b581c571bb --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-build-with-fno-common.patch @@ -0,0 +1,311 @@ +From 9a46462f08535e946d97fd40c79229a7ee8b7336 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 17 Aug 2020 00:00:00 -0700 +Subject: [PATCH] Fix build with -fno-common + +Mark the declarations with extern where needed in header files + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/ckpt/agent/cpa_cb.h | 2 +- + src/ckpt/ckptd/cpd_init.h | 2 +- + src/evt/agent/eda.h | 2 +- + src/evt/evtd/eds.h | 2 +- + src/evt/evtd/eds_amf.c | 2 ++ + src/evt/evtd/eds_amf.h | 2 +- + src/evt/evtd/eds_cb.h | 2 +- + src/imm/immd/immd.h | 2 +- + src/lck/lckd/gld_dl_api.h | 4 ++-- + src/lck/lcknd/glnd_cb.h | 4 ++-- + src/mds/mds_core.h | 34 +++++++++++++++++++--------------- + src/mds/mds_dt_tcp.c | 2 ++ + src/mds/mds_dt_tcp.h | 2 +- + src/mds/mds_main.c | 2 +- + src/msg/msgnd/mqnd_db.h | 2 +- + 15 files changed, 37 insertions(+), 29 deletions(-) + +diff --git a/src/ckpt/agent/cpa_cb.h b/src/ckpt/agent/cpa_cb.h +index ac48c6c..d633583 100644 +--- a/src/ckpt/agent/cpa_cb.h ++++ b/src/ckpt/agent/cpa_cb.h +@@ -119,7 +119,7 @@ typedef struct cpa_cb { + + } CPA_CB; + +-uint32_t gl_cpa_hdl; ++extern uint32_t gl_cpa_hdl; + + typedef struct cpa_prcess_evt_sync { + NCS_QELEM qelem; +diff --git a/src/ckpt/ckptd/cpd_init.h b/src/ckpt/ckptd/cpd_init.h +index 0c02642..cf3466b 100644 +--- a/src/ckpt/ckptd/cpd_init.h ++++ b/src/ckpt/ckptd/cpd_init.h +@@ -33,7 +33,7 @@ + #include <saAmf.h> + #include "cpd_cb.h" + +-uint32_t gl_cpd_cb_hdl; ++extern uint32_t gl_cpd_cb_hdl; + + /* Macro to get the component name for the component type */ + #define m_CPD_TASKNAME "CPD" +diff --git a/src/evt/agent/eda.h b/src/evt/agent/eda.h +index 4d1991c..138c910 100644 +--- a/src/evt/agent/eda.h ++++ b/src/evt/agent/eda.h +@@ -39,7 +39,7 @@ + #include "base/logtrace.h" + + /* EDA CB global handle declaration */ +-uint32_t gl_eda_hdl; ++extern uint32_t gl_eda_hdl; + + /* EDA Default MDS timeout value */ + #define EDA_MDS_DEF_TIMEOUT 100 +diff --git a/src/evt/evtd/eds.h b/src/evt/evtd/eds.h +index bc9c429..3545d77 100644 +--- a/src/evt/evtd/eds.h ++++ b/src/evt/evtd/eds.h +@@ -72,6 +72,6 @@ + #include "base/daemon.h" + + /* EDS CB global handle declaration */ +-uint32_t gl_eds_hdl; ++extern uint32_t gl_eds_hdl; + + #endif // EVT_EVTD_EDS_H_ +diff --git a/src/evt/evtd/eds_amf.c b/src/evt/evtd/eds_amf.c +index 97b71a5..adebf0c 100644 +--- a/src/evt/evtd/eds_amf.c ++++ b/src/evt/evtd/eds_amf.c +@@ -30,6 +30,8 @@ stuff. + #include "eds.h" + #include "eds_dl_api.h" + ++struct next_HAState nextStateInfo; ++ + /* HA AMF statemachine & State handler definitions */ + + /**************************************************************************** +diff --git a/src/evt/evtd/eds_amf.h b/src/evt/evtd/eds_amf.h +index e9aeaa6..f9803b4 100644 +--- a/src/evt/evtd/eds_amf.h ++++ b/src/evt/evtd/eds_amf.h +@@ -49,7 +49,7 @@ uint32_t eds_quiesced_state_handler(EDS_CB *cb, SaInvocationT invocation); + struct next_HAState { + uint8_t nextState1; + uint8_t nextState2; +-} nextStateInfo; /* AMF HA state can transit to a maximum of the two defined ++}; /* AMF HA state can transit to a maximum of the two defined + states */ + + #define VALIDATE_STATE(curr, next) \ +diff --git a/src/evt/evtd/eds_cb.h b/src/evt/evtd/eds_cb.h +index c127ead..19c48cd 100644 +--- a/src/evt/evtd/eds_cb.h ++++ b/src/evt/evtd/eds_cb.h +@@ -40,7 +40,7 @@ + #include "base/ncssysf_tmr.h" + + /* global variables */ +-uint32_t gl_eds_hdl; ++extern uint32_t gl_eds_hdl; + + struct eda_reg_list_tag; + +diff --git a/src/imm/immd/immd.h b/src/imm/immd/immd.h +index 7dc1da6..bab3945 100644 +--- a/src/imm/immd/immd.h ++++ b/src/imm/immd/immd.h +@@ -42,7 +42,7 @@ + #include "immd_sbedu.h" + #include "base/ncs_mda_pvt.h" + +-IMMD_CB *immd_cb; ++extern IMMD_CB *immd_cb; + + extern uint32_t initialize_for_assignment(IMMD_CB *cb, SaAmfHAStateT ha_state); + +diff --git a/src/lck/lckd/gld_dl_api.h b/src/lck/lckd/gld_dl_api.h +index 6476a71..3a67fd1 100644 +--- a/src/lck/lckd/gld_dl_api.h ++++ b/src/lck/lckd/gld_dl_api.h +@@ -33,7 +33,7 @@ + #include "base/ncsgl_defs.h" + #include "base/ncs_lib.h" + +-uint32_t gl_gld_hdl; +-uint32_t gld_lib_req(NCS_LIB_REQ_INFO *req_info); ++extern uint32_t gl_gld_hdl; ++extern uint32_t gld_lib_req(NCS_LIB_REQ_INFO *req_info); + + #endif // LCK_LCKD_GLD_DL_API_H_ +diff --git a/src/lck/lcknd/glnd_cb.h b/src/lck/lcknd/glnd_cb.h +index 3b82f60..77a1f88 100644 +--- a/src/lck/lcknd/glnd_cb.h ++++ b/src/lck/lcknd/glnd_cb.h +@@ -28,8 +28,8 @@ extern "C" { + #endif + + /* global variables */ +-uint32_t gl_glnd_hdl; +-NCSCONTEXT gl_glnd_task_hdl; ++extern uint32_t gl_glnd_hdl; ++extern NCSCONTEXT gl_glnd_task_hdl; + + /* macros for the global varibales */ + #define m_GLND_RETRIEVE_GLND_CB_HDL gl_glnd_hdl +diff --git a/src/mds/mds_core.h b/src/mds/mds_core.h +index dad62cd..ed69d3a 100644 +--- a/src/mds/mds_core.h ++++ b/src/mds/mds_core.h +@@ -26,6 +26,10 @@ + #ifndef MDS_MDS_CORE_H_ + #define MDS_MDS_CORE_H_ + ++#ifndef EXTERN ++#define EXTERN extern ++#endif ++ + #include <pthread.h> + #include "base/ncsgl_defs.h" + #include "mds/mds_papi.h" +@@ -600,65 +604,65 @@ extern "C" { + /* ******************************************** */ + + /* Initialization of MDTM Module */ +-uint32_t (*mds_mdtm_init)(NODE_ID node_id, uint32_t *mds_tipc_ref); ++EXTERN uint32_t (*mds_mdtm_init)(NODE_ID node_id, uint32_t *mds_tipc_ref); + + /* Destroying the MDTM Module*/ +-uint32_t (*mds_mdtm_destroy)(void); ++EXTERN uint32_t (*mds_mdtm_destroy)(void); + +-uint32_t (*mds_mdtm_send)(MDTM_SEND_REQ *req); ++EXTERN uint32_t (*mds_mdtm_send)(MDTM_SEND_REQ *req); + + /* SVC Install */ +-uint32_t (*mds_mdtm_svc_install)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, ++EXTERN uint32_t (*mds_mdtm_svc_install)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, + NCSMDS_SCOPE_TYPE install_scope, + V_DEST_RL role, MDS_VDEST_ID vdest_id, + NCS_VDEST_TYPE vdest_policy, + MDS_SVC_PVT_SUB_PART_VER mds_svc_pvt_ver); + + /* SVC Uninstall */ +-uint32_t (*mds_mdtm_svc_uninstall)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, ++EXTERN uint32_t (*mds_mdtm_svc_uninstall)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, + NCSMDS_SCOPE_TYPE install_scope, + V_DEST_RL role, MDS_VDEST_ID vdest_id, + NCS_VDEST_TYPE vdest_policy, + MDS_SVC_PVT_SUB_PART_VER mds_svc_pvt_ver); + + /* SVC Subscribe */ +-uint32_t (*mds_mdtm_svc_subscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, ++EXTERN uint32_t (*mds_mdtm_svc_subscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, + NCSMDS_SCOPE_TYPE subscribe_scope, + MDS_SVC_HDL local_svc_hdl, + MDS_SUBTN_REF_VAL *subtn_ref_val); + + /* added svc_hdl */ + /* SVC Unsubscribe */ +-uint32_t (*mds_mdtm_svc_unsubscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, ++EXTERN uint32_t (*mds_mdtm_svc_unsubscribe)(PW_ENV_ID pwe_id, MDS_SVC_ID svc_id, + NCSMDS_SCOPE_TYPE subscribe_scope, + MDS_SUBTN_REF_VAL subtn_ref_val); + + /* VDEST Install */ +-uint32_t (*mds_mdtm_vdest_install)(MDS_VDEST_ID vdest_id); ++EXTERN uint32_t (*mds_mdtm_vdest_install)(MDS_VDEST_ID vdest_id); + + /* VDEST Uninstall */ +-uint32_t (*mds_mdtm_vdest_uninstall)(MDS_VDEST_ID vdest_id); ++EXTERN uint32_t (*mds_mdtm_vdest_uninstall)(MDS_VDEST_ID vdest_id); + + /* VDEST Subscribe */ +-uint32_t (*mds_mdtm_vdest_subscribe)(MDS_VDEST_ID vdest_id, ++EXTERN uint32_t (*mds_mdtm_vdest_subscribe)(MDS_VDEST_ID vdest_id, + MDS_SUBTN_REF_VAL *subtn_ref_val); + + /* VDEST Unsubscribe */ +-uint32_t (*mds_mdtm_vdest_unsubscribe)(MDS_VDEST_ID vdest_id, ++EXTERN uint32_t (*mds_mdtm_vdest_unsubscribe)(MDS_VDEST_ID vdest_id, + MDS_SUBTN_REF_VAL subtn_ref_val); + + /* Tx Register (For incrementing the use count) */ +-uint32_t (*mds_mdtm_tx_hdl_register)(MDS_DEST adest); ++EXTERN uint32_t (*mds_mdtm_tx_hdl_register)(MDS_DEST adest); + + /* Tx Unregister (For decrementing the use count) */ +-uint32_t (*mds_mdtm_tx_hdl_unregister)(MDS_DEST adest); ++EXTERN uint32_t (*mds_mdtm_tx_hdl_unregister)(MDS_DEST adest); + + /* Node subscription */ +-uint32_t (*mds_mdtm_node_subscribe)(MDS_SVC_HDL svc_hdl, ++EXTERN uint32_t (*mds_mdtm_node_subscribe)(MDS_SVC_HDL svc_hdl, + MDS_SUBTN_REF_VAL *subtn_ref_val); + + /* Node unsubscription */ +-uint32_t (*mds_mdtm_node_unsubscribe)(MDS_SUBTN_REF_VAL subtn_ref_val); ++EXTERN uint32_t (*mds_mdtm_node_unsubscribe)(MDS_SUBTN_REF_VAL subtn_ref_val); + + #ifdef __cplusplus + } +diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c +index 4a37246..e73cef4 100644 +--- a/src/mds/mds_dt_tcp.c ++++ b/src/mds/mds_dt_tcp.c +@@ -70,6 +70,8 @@ NCS_PATRICIA_TREE mdtm_reassembly_list; + + /* Get the pid of the process */ + pid_t mdtm_pid; ++ ++MDTM_TCP_CB *tcp_cb; + + static void mds_mdtm_enc_init(MDS_MDTM_DTM_MSG *init, uint8_t *buff); + static uint32_t mdtm_create_rcv_task(void); +diff --git a/src/mds/mds_dt_tcp.h b/src/mds/mds_dt_tcp.h +index 1065464..350d534 100644 +--- a/src/mds/mds_dt_tcp.h ++++ b/src/mds/mds_dt_tcp.h +@@ -50,7 +50,7 @@ typedef struct mdtm_tcp_cb { + + } MDTM_TCP_CB; + +-MDTM_TCP_CB *tcp_cb; ++extern MDTM_TCP_CB *tcp_cb; + + typedef enum mds_mdtm_dtm_msg_types { + MDS_MDTM_DTM_PID_TYPE = 1, +diff --git a/src/mds/mds_main.c b/src/mds/mds_main.c +index 0bcb2f9..5671ed3 100644 +--- a/src/mds/mds_main.c ++++ b/src/mds/mds_main.c +@@ -20,7 +20,7 @@ + #endif + + #include "osaf/configmake.h" +- ++#define EXTERN + /***************************************************************************** + .............................................................................. + +diff --git a/src/msg/msgnd/mqnd_db.h b/src/msg/msgnd/mqnd_db.h +index b78024e..fee43e5 100644 +--- a/src/msg/msgnd/mqnd_db.h ++++ b/src/msg/msgnd/mqnd_db.h +@@ -33,7 +33,7 @@ + #include <saClm.h> + #include <saImmOi.h> + /* Decleration for global variable */ +-uint32_t gl_mqnd_cb_hdl; ++extern uint32_t gl_mqnd_cb_hdl; + + /* Macros for reading global database */ + #define m_MQND_STORE_HDL(hdl) (gl_mqnd_cb_hdl = (hdl)) +-- +2.28.0 + diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch deleted file mode 100644 index db6796d05d..0000000000 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch +++ /dev/null @@ -1,76 +0,0 @@ -From ae7178a78aba2e5766b70191617113487fd7ad0b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 16 Apr 2018 18:29:17 -0700 -Subject: [PATCH] Fix string overflow in snprintf - -Fixes errors like -error: '%s' dir -ective output may be truncated writing up to 255 bytes into a region of size 32 [-Werror=forma -t-truncation=] - snprintf(reinterpret_cast<char *>(Healthy.key), sizeof(Healthy.key), "%s", - ^~~~ - hlth_str); - ~~~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - src/log/logd/lgs_util.cc | 4 ++-- - src/rde/rded/rde_amf.cc | 2 +- - src/smf/smfd/SmfUpgradeCampaign.cc | 4 ++-- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/log/logd/lgs_util.cc b/src/log/logd/lgs_util.cc -index ac93d5a..cce80f3 100644 ---- a/src/log/logd/lgs_util.cc -+++ b/src/log/logd/lgs_util.cc -@@ -200,12 +200,12 @@ char *lgs_get_time(time_t *time_in) { - - stringSize = 5 * sizeof(char); - snprintf(srcString, (size_t)stringSize, "%d", -- (timeStampData->tm_year + START_YEAR)); -+ (timeStampData->tm_year + START_YEAR) & 0x4dU); - - strncpy(timeStampString, srcString, stringSize); - - stringSize = 3 * sizeof(char); -- snprintf(srcString, (size_t)stringSize, "%02d", (timeStampData->tm_mon + 1)); -+ snprintf(srcString, (size_t)stringSize, "%02d", (timeStampData->tm_mon + 1) & 0x2dU); - - strncat(timeStampString, srcString, stringSize); - -diff --git a/src/rde/rded/rde_amf.cc b/src/rde/rded/rde_amf.cc -index 81e521e..d53cc48 100644 ---- a/src/rde/rded/rde_amf.cc -+++ b/src/rde/rded/rde_amf.cc -@@ -102,7 +102,7 @@ static uint32_t rde_amf_healthcheck_start(RDE_AMF_CB *rde_amf_cb) { - SaAmfHealthcheckKeyT Healthy; - SaNameT SaCompName; - char *phlth_ptr; -- char hlth_str[256]; -+ char hlth_str[32]; - - TRACE_ENTER(); - -diff --git a/src/smf/smfd/SmfUpgradeCampaign.cc b/src/smf/smfd/SmfUpgradeCampaign.cc -index 45cdce8..6761bcf 100644 ---- a/src/smf/smfd/SmfUpgradeCampaign.cc -+++ b/src/smf/smfd/SmfUpgradeCampaign.cc -@@ -447,7 +447,7 @@ SaAisErrorT SmfUpgradeCampaign::tooManyRestarts(bool *o_result) { - TRACE_ENTER(); - SaAisErrorT rc = SA_AIS_OK; - SaImmAttrValuesT_2 **attributes; -- int curCnt = 0; -+ short int curCnt = 0; - - /* Read the SmfCampRestartInfo object smfCampRestartCnt attr */ - std::string obj = "smfRestartInfo=info," + -@@ -473,7 +473,7 @@ SaAisErrorT SmfUpgradeCampaign::tooManyRestarts(bool *o_result) { - attrsmfCampRestartCnt.setName("smfCampRestartCnt"); - attrsmfCampRestartCnt.setType("SA_IMM_ATTR_SAUINT32T"); - char buf[5]; -- snprintf(buf, 4, "%d", curCnt); -+ snprintf(buf, 4, "%hd", curCnt); - attrsmfCampRestartCnt.addValue(buf); - imoCampRestartInfo.addValue(attrsmfCampRestartCnt); - diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch new file mode 100644 index 0000000000..7e88c498ee --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Use-correct-printf-format-for-__fsblkcnt_t.patch @@ -0,0 +1,31 @@ +From 90f81c1fb3e560cfc99ee7ab9a48a1736e3929cd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Nov 2020 13:22:31 -0800 +Subject: [PATCH] Use correct printf format for __fsblkcnt_t + +This depends on time_t size and on some 32bit architectures e.g. riscv32 +this would be a 64bit value + +Fixes +os_defs.c:920:40: error: format '%ld' expects argument of type 'long int', but argument 3 has type '__fsblkcnt_t' {aka 'long long unsigned int'} [-Werror=format=] + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/base/os_defs.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/src/base/os_defs.c ++++ b/src/base/os_defs.c +@@ -917,7 +917,11 @@ uint32_t ncs_os_posix_shm(NCS_OS_POSIX_S + ((statsvfs.f_bfree - 1) * statsvfs.f_frsize)) { + syslog( + LOG_ERR, ++#if (_FILE_OFFSET_BITS == 64 || __TIMESIZE == 64) && __WORDSIZE == 32 ++ "Insufficient shared memory (%lld) to write the data of size: %" PRId64 ++#else + "Insufficient shared memory (%ld) to write the data of size: %" PRId64 ++#endif + "\n", + (statsvfs.f_bfree * statsvfs.f_frsize), + req->info.write.i_write_size); diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch index be0a587679..c5264e5e7a 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch @@ -6,6 +6,8 @@ Subject: [PATCH] configure: Disable format-overflow if supported by gcc Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + Makefile.am | 6 +-- configure.ac | 2 + m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++ diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch index e4bbb4c3cd..daf06d38fb 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch @@ -9,6 +9,8 @@ and we can use non-gcc compilers Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch new file mode 100644 index 0000000000..21abcf75b5 --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-create_empty_library-Use-CC-variable-intead-of-hardc.patch @@ -0,0 +1,23 @@ +From 300fd3e27e71a91fc52d3f985ed4fde548852853 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 27 Sep 2019 12:50:11 -0700 +Subject: [PATCH] create_empty_library: Use CC variable intead of hardcoding + gcc + +This ensures that cross-compiles can succeed, otherwise we get wrong +architecture on these stub libraries + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + scripts/create_empty_library | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/create_empty_library ++++ b/scripts/create_empty_library +@@ -66,4 +66,4 @@ for s in $symbols; do + echo "SaAisErrorT $s() { return SA_AIS_ERR_UNAVAILABLE; }" >> "$tmpdir/lib.c" + done + rm -f "$1" +-gcc -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1" ++$CC -O2 -shared -fPIC "$tmpdir/lib.c" -Wl,-version-script="$2" -Wl,-soname="$libbase.so.$version1" -o "$1" $LDFLAGS diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch new file mode 100644 index 0000000000..f45874680d --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-immom_python-convert-to-python3.patch @@ -0,0 +1,50 @@ +From ffc829603a2c50674c8e04de5221e43f80bfc1b2 Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin <andrey.z@gmail.com> +Date: Mon, 27 Jan 2020 13:00:53 +0000 +Subject: [PATCH] immom_python: convert to python3 + +Convert immom_python to use python3, python2 is EOL and is not supported +by all distributions anymore. + +Upstream-Status: Pending + +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> +--- + samples/immsv/immom_python/immom.py | 2 +- + samples/immsv/immom_python/immomexamples.py | 2 +- + samples/immsv/immom_python/immomtest.py | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/samples/immsv/immom_python/immom.py b/samples/immsv/immom_python/immom.py +index 4f68625ed..f88197000 100755 +--- a/samples/immsv/immom_python/immom.py ++++ b/samples/immsv/immom_python/immom.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/python ++#!/usr/bin/env python3 + """ + immom -- An IMM Object Manager in Python + +diff --git a/samples/immsv/immom_python/immomexamples.py b/samples/immsv/immom_python/immomexamples.py +index 70c579265..bd693c25f 100755 +--- a/samples/immsv/immom_python/immomexamples.py ++++ b/samples/immsv/immom_python/immomexamples.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/bin/env python3 + + import immom + +diff --git a/samples/immsv/immom_python/immomtest.py b/samples/immsv/immom_python/immomtest.py +index 4b98bea8c..ed2463ba9 100755 +--- a/samples/immsv/immom_python/immomtest.py ++++ b/samples/immsv/immom_python/immomtest.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # -*- coding: utf-8 -*- + + import immom +-- +2.17.1 + diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch index e40d2b3198..99fab3b034 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch @@ -9,6 +9,8 @@ redirecting incorrect #include <wait.h> to <sys/wait.h> Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/imm/common/immpbe_dump.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-cstdint-for-uintXX_t-types.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-cstdint-for-uintXX_t-types.patch new file mode 100644 index 0000000000..e36d4e0cdc --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-cstdint-for-uintXX_t-types.patch @@ -0,0 +1,43 @@ +From 225891675b80beaa9d74ce56809e52c4451df72c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 25 Jan 2023 21:46:22 -0800 +Subject: [PATCH 1/2] include cstdint for uintXX_t types + +GCC-13 needs it [1] + +[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/imm/immnd/ImmModel.h | 1 + + src/osaf/consensus/consensus_env.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/imm/immnd/ImmModel.h b/src/imm/immnd/ImmModel.h +index 44da470..0660431 100644 +--- a/src/imm/immnd/ImmModel.h ++++ b/src/imm/immnd/ImmModel.h +@@ -22,6 +22,7 @@ + #include <saImmOm.h> + #include <cstdarg> + #include <sys/types.h> ++#include <cstdint> + #include <string> + #include <vector> + #include <map> +diff --git a/src/osaf/consensus/consensus_env.h b/src/osaf/consensus/consensus_env.h +index df4f93a..89ccf46 100644 +--- a/src/osaf/consensus/consensus_env.h ++++ b/src/osaf/consensus/consensus_env.h +@@ -15,6 +15,7 @@ + #ifndef OSAF_CONSENSUS_CONSENSUS_ENV_H_ + #define OSAF_CONSENSUS_CONSENSUS_ENV_H_ + ++#include <cstdint> + #include <string> + #include "base/mutex.h" + +-- +2.39.1 + diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-missing-array-header.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-missing-array-header.patch new file mode 100644 index 0000000000..e735d432a7 --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-include-missing-array-header.patch @@ -0,0 +1,32 @@ +From 6168d43ddd353b92ad8bcd5c49dc68f18caa8a00 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 12 Apr 2022 17:07:49 -0700 +Subject: [PATCH 1/2] include missing <array> header + +Fixes +src/osaf/consensus/key_value.cc:25:30: error: aggregate 'std::array<char, 128> buffer' has incomplete type and cannot be defined + 25 | std::array<char, buf_size> buffer; + | ^~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/osaf/consensus/key_value.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/osaf/consensus/key_value.cc b/src/osaf/consensus/key_value.cc +index 692dd3f..6e16cbf 100644 +--- a/src/osaf/consensus/key_value.cc ++++ b/src/osaf/consensus/key_value.cc +@@ -18,7 +18,7 @@ + #include "base/getenv.h" + #include "base/logtrace.h" + #include "osaf/consensus/consensus.h" +- ++#include <array> + int KeyValue::Execute(const std::string& command, std::string& output) { + TRACE_ENTER(); + constexpr size_t buf_size = 128; +-- +2.35.1 + diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch index e4a3975da6..2521839c73 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch @@ -9,6 +9,8 @@ Do not use the deprecated headers under include/sys Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/base/os_defs.h | 5 +++-- src/mds/mds_dt_tcp.c | 1 - src/mds/mds_dt_tcp_disc.h | 2 +- diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-Werror-enum-int-mismatch-with-gcc13.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-Werror-enum-int-mismatch-with-gcc13.patch new file mode 100644 index 0000000000..a6aa2c3d07 --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-Werror-enum-int-mismatch-with-gcc13.patch @@ -0,0 +1,61 @@ +From 5e5686de677c884d5d785254412ced3c9d2d1b08 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 25 Jan 2023 21:47:45 -0800 +Subject: [PATCH 2/2] Fix -Werror=enum-int-mismatch with gcc13 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + src/evt/agent/eda_hdl.h | 5 +++-- + src/evt/evtd/eds_mds.h | 3 +-- + src/smf/smfnd/smfnd.h | 8 ++++---- + 3 files changed, 8 insertions(+), 8 deletions(-) + +--- a/src/evt/agent/eda_hdl.h ++++ b/src/evt/agent/eda_hdl.h +@@ -31,6 +31,7 @@ + #define EVT_AGENT_EDA_HDL_H_ + + #include "evt/agent/eda.h" ++#include "ais/include/saAis.h" + + uint32_t eda_hdl_cbk_dispatch(EDA_CB *, EDA_CLIENT_HDL_REC *, SaDispatchFlagsT); + +@@ -68,11 +69,11 @@ EDA_CHANNEL_HDL_REC *eda_find_chan_hdl_r + + void eda_msg_destroy(EDSV_MSG *msg); + +-uint32_t eda_extract_pattern_from_event( ++SaAisErrorT eda_extract_pattern_from_event( + SaEvtEventPatternArrayT *from_pattern_array, + SaEvtEventPatternArrayT **to_pattern_array); + +-uint32_t eda_allocate_and_extract_pattern_from_event( ++SaAisErrorT eda_allocate_and_extract_pattern_from_event( + SaEvtEventPatternArrayT *from_pattern_array, + SaEvtEventPatternArrayT **to_pattern_array); + +--- a/src/evt/evtd/eds_mds.h ++++ b/src/evt/evtd/eds_mds.h +@@ -49,8 +49,7 @@ uint32_t eds_mds_msg_send(EDS_CB *cb, ED + MDS_SEND_PRIORITY_TYPE prio); + + uint32_t eds_mds_ack_send(EDS_CB *cb, EDSV_MSG *msg, MDS_DEST dest, +- SaTimeT timeout, MDS_SEND_PRIORITY_TYPE prio); +- ++ SaTimeT timeout, uint32_t prio); + uint32_t eds_dec_subscribe_msg(NCS_UBAID *uba, long msg_hdl, uint8_t ckpt_flag); + + uint32_t eds_dec_publish_msg(NCS_UBAID *uba, long msg_hdl, uint8_t ckpt_flag); +--- a/src/smf/smfnd/smfnd.h ++++ b/src/smf/smfnd/smfnd.h +@@ -76,7 +76,7 @@ extern "C" { + #endif + + /* smfnd_amf.c */ +-extern uint32_t smfnd_amf_init(smfnd_cb_t *cb); ++extern SaAisErrorT smfnd_amf_init(smfnd_cb_t *cb); + + /* smfnd_mds.c */ + extern uint32_t smfnd_mds_init(smfnd_cb_t *cb); diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-format-truncation-errors.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-format-truncation-errors.patch deleted file mode 100644 index f98e28da9c..0000000000 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-format-truncation-errors.patch +++ /dev/null @@ -1,100 +0,0 @@ -From c5034fe42df8923bcefc10e163151997d70b6241 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 16 Apr 2018 14:56:47 -0700 -Subject: [PATCH] Fix format-truncation errors - -Fixes errors with gcc8 eg. -error: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size between 0 and 254 [-Werror=format-truncation=] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - src/base/daemon.c | 4 ++-- - src/mds/mds_c_db.c | 8 ++++---- - src/mds/mds_core.h | 4 ++-- - src/mds/mds_dt2c.h | 2 +- - 4 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/base/daemon.c b/src/base/daemon.c -index 361dd8d..4001b73 100644 ---- a/src/base/daemon.c -+++ b/src/base/daemon.c -@@ -95,11 +95,11 @@ static int __create_pidfile(const char *pidfile) - { - FILE *file = NULL; - int fd, rc = 0; -- char pidfiletmp[NAME_MAX] = {0}; -+ char pidfiletmp[NAME_MAX+12] = {0}; - pid_t pid; - - pid = getpid(); -- snprintf(pidfiletmp, NAME_MAX, "%s.%u.tmp", pidfile, pid); -+ snprintf(pidfiletmp, NAME_MAX+12, "%s.%u.tmp", pidfile, pid); - - /* open the file and associate a stream with it */ - if (((fd = open(pidfiletmp, O_RDWR | O_CREAT, 0644)) == -1) || -diff --git a/src/mds/mds_c_db.c b/src/mds/mds_c_db.c -index e6b95cd..3d4a222 100644 ---- a/src/mds/mds_c_db.c -+++ b/src/mds/mds_c_db.c -@@ -124,10 +124,10 @@ void get_adest_details(MDS_DEST adest, char *adest_details) - } - - if (remote == true) -- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, -+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, - "<rem_nodeid[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); - else -- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, -+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, - "<nodeid[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); - - m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details); -@@ -207,10 +207,10 @@ void get_subtn_adest_details(MDS_PWE_HDL pwe_hdl, MDS_SVC_ID svc_id, - } - - if (remote == true) -- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, -+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, - "<rem_node[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); - else -- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, -+ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, - "<node[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); - done: - m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details); -diff --git a/src/mds/mds_core.h b/src/mds/mds_core.h -index 37696d4..7f5225d 100644 ---- a/src/mds/mds_core.h -+++ b/src/mds/mds_core.h -@@ -163,7 +163,7 @@ typedef struct mds_subscription_results_info { - uint32_t msg_snd_cnt; /* Message send count to this destination */ - uint32_t msg_rcv_cnt; /* Message rcv count from this destination */ - char sub_adest_details -- [MDS_MAX_PROCESS_NAME_LEN]; /* <node[slotno]:processname[pid]> */ -+ [MDS_MAX_PROCESS_NAME_LEN+24]; /* <node[slotno]:processname[pid]> */ - - } MDS_SUBSCRIPTION_RESULTS_INFO; - -@@ -194,7 +194,7 @@ typedef struct mds_subscription_info { - count is grater than ZERO bcast (multi-unicast) */ - uint32_t prev_ver_sub_count; - char sub_adest_details -- [MDS_MAX_PROCESS_NAME_LEN]; /* <node[slotno]:processname[pid]> */ -+ [MDS_MAX_PROCESS_NAME_LEN+24]; /* <node[slotno]:processname[pid]> */ - - } MDS_SUBSCRIPTION_INFO; - -diff --git a/src/mds/mds_dt2c.h b/src/mds/mds_dt2c.h -index 012999c..006b722 100644 ---- a/src/mds/mds_dt2c.h -+++ b/src/mds/mds_dt2c.h -@@ -143,7 +143,7 @@ typedef struct mdtm_send_req { - */ - MDS_DEST adest; /* MDTM to do local/remote routing, destination adest */ - char sub_adest_details -- [MDS_MAX_PROCESS_NAME_LEN]; /* <node[nodeid]:processname[pid]> */ -+ [MDS_MAX_PROCESS_NAME_LEN+24]; /* <node[nodeid]:processname[pid]> */ - MDS_SEND_PRIORITY_TYPE pri; - MDS_CLIENT_MSG_FORMAT_VER - msg_fmt_ver; /* message format version specification */ diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0002-configure-Disable-selected-warnings.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0002-configure-Disable-selected-warnings.patch new file mode 100644 index 0000000000..a9953259ce --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0002-configure-Disable-selected-warnings.patch @@ -0,0 +1,28 @@ +From fe654d5340d18f04e4689ba19f843554909a0c00 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 12 Apr 2022 17:16:37 -0700 +Subject: [PATCH 2/2] configure: Disable selected warnings + +These warnings are emitted when compiling with gcc 11 and gcc 12 +Do not treat them as errors + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -601,7 +601,10 @@ if test -z "$OSAF_HARDEN_FLAGS"; then + fi + AC_SUBST(OSAF_HARDEN_FLAGS) + +-AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS=-Wno-error=format-overflow]) ++AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS='-Wno-error=format-overflow']) ++AX_CHECK_COMPILE_FLAG([-Wuse-after-free],[NOWARNINGS+=' -Wno-error=use-after-free']) ++AX_CHECK_COMPILE_FLAG([-Wstringop-truncation],[NOWARNINGS+=' -Wno-error=stringop-truncation']) ++AX_CHECK_COMPILE_FLAG([-Warray-bounds],[NOWARNINGS+=' -Wno-error=array-bounds']) + AC_SUBST(NOWARNINGS) + ############################################# + # List the output Makefiles diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0008-check-for-size-before-using-strncpy.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0008-check-for-size-before-using-strncpy.patch deleted file mode 100644 index 497bb07d8d..0000000000 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0008-check-for-size-before-using-strncpy.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 29510dd81e3a5e96151afdb0702863cbfd640766 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 22 Jun 2018 18:58:59 -0700 -Subject: [PATCH] check for size before using strncpy - -ensures that size is never execeding the string length -that execPath can hold - -Fixes -error: '__builtin___strncpy_chk' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/imm/immnd/immnd_proc.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/imm/immnd/immnd_proc.c b/src/imm/immnd/immnd_proc.c -index 015932a..c8f115e 100644 ---- a/src/imm/immnd/immnd_proc.c -+++ b/src/imm/immnd/immnd_proc.c -@@ -1902,6 +1902,10 @@ static int immnd_forkPbe(IMMND_CB *cb) - LOG_ER("Pathname too long: %u max is 1023", newLen); - return -1; - } -+ if (execDirLen > 1023 || execDirLen < 0) { -+ LOG_ER("Execdir name too long: %u max is 1023", execDirLen); -+ return -1; -+ } - - strncpy(execPath, cb->mProgName, execDirLen); - execPath[execDirLen] = 0; |