Reviewed, but not tested.
Ack from me.

Best regards,
Zoran

-----Original Message-----
From: Anders Bjornerstedt [mailto:[email protected]] 
Sent: den 10 juli 2014 14:40
To: [email protected]
Cc: [email protected]
Subject: [devel] [PATCH 1 of 1] IMM: RDN limitation of 64 characters made 
conditional on 'longDnsAllowed' [#23]

 osaf/services/saf/immsv/immnd/ImmModel.cc |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


If the 'longDnsAllowed' attribute in the OpenSAF IMM service object 
'safRdn=immManagement,safApp=safImmService' is set to a non-zero value, then 
long DNs are allowed in the cluster.

This patch fixes so that this config setting will then also disable the 64 byte 
limit on RDN length.

diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc 
b/osaf/services/saf/immsv/immnd/ImmModel.cc
--- a/osaf/services/saf/immsv/immnd/ImmModel.cc
+++ b/osaf/services/saf/immsv/immnd/ImmModel.cc
@@ -6613,7 +6613,7 @@ SaAisErrorT ImmModel::ccbObjectCreate(Im
             
             /* size includes null termination byte. */
             if(((size_t)attrValues->n.attrValue.val.x.size > 65) &&  
-                (i4->second->mValueType == SA_IMM_ATTR_SASTRINGT))
+                (i4->second->mValueType == SA_IMM_ATTR_SASTRINGT) && 
+ !getLongDnsAllowed())
             {
                 LOG_NO("ERR_INVALID_PARAM: RDN attribute value %s is too 
large: %u. Max length is 64 "
                     "for SaStringT", attrValues->n.attrValue.val.x.buf, 
(attrValues->n.attrValue.val.x.size -1)); @@ -12941,7 +12941,7 @@ 
ImmModel::rtObjectCreate(struct ImmsvOmC
             
             /* size includes null termination byte. */
             if(((size_t)attrValues->n.attrValue.val.x.size > 65) &&
-                (attrValues->n.attrValueType == SA_IMM_ATTR_SASTRINGT))
+                (attrValues->n.attrValueType == SA_IMM_ATTR_SASTRINGT) 
+ && !getLongDnsAllowed())
             {
                 LOG_NO("ERR_INVALID_PARAM: RDN attribute value %s is too 
large: %u. Max length is 64 "
                     "for SaStringT", attrValues->n.attrValue.val.x.buf, 
(attrValues->n.attrValue.val.x.size-1));

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse Turn 
processes into business applications with Bonita BPM Community Edition Quickly 
connect people, data, and systems into organized workflows Winner of BOSSIE, 
CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft 
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to