Will get committed tomorrow. Please review.
Thanks -Nagu -----Original Message----- From: Nagendra Kumar Sent: 09 September 2013 17:27 To: Mathivanan Naickan Palanivelu; [email protected]; [email protected]; Praveen Malviya Cc: [email protected] Subject: [devel] [PATCH 1 of 1] Amfd: Allow admin operation on middleware only when originated from SMF [#477] osaf/services/saf/amf/amfd/avd_su.cc | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/osaf/services/saf/amf/amfd/avd_su.cc b/osaf/services/saf/amf/amfd/avd_su.cc --- a/osaf/services/saf/amf/amfd/avd_su.cc +++ b/osaf/services/saf/amf/amfd/avd_su.cc @@ -953,6 +953,33 @@ static void su_admin_op_cb(SaImmOiHandle goto done; } + /* Allow admin operations on middleware sus, if saAmfSUMaintenanceCampaign is set on + any SU hosted on the same node.*/ + if (su->sg_of_su->sg_ncs_spec == true) { + for (su_ptr = node->list_of_su; su_ptr != NULL; su_ptr = su_ptr->avnd_list_su_next) { + if (su_ptr->saAmfSUMaintenanceCampaign.length == 0) { + LOG_ER("saAmfSUMaintenanceCampaign not set for %s, rejecting operation", + su_ptr->name.value); + rc = SA_AIS_ERR_BAD_OPERATION; + goto done; + } else { + sumaintenance_set = true; + break; + } + } + for (su_ptr = node->list_of_ncs_su; (su_ptr != NULL) && (!sumaintenance_set); + su_ptr = su_ptr->avnd_list_su_next) { + if (su_ptr->saAmfSUMaintenanceCampaign.length == 0) { + LOG_ER("saAmfSUMaintenanceCampaign not set for %s, rejecting operation", + su_ptr->name.value); + rc = SA_AIS_ERR_BAD_OPERATION; + goto done; + } else { + break; + } + } + } + /* Validation has passed and admin operation should be done. Proceed with it... */ switch (op_id) { case SA_AMF_ADMIN_UNLOCK: ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
