Re: [devel] [PATCH 0/4] Review Request for clm: add new test cases in clm apitest [#2914]

2018-11-09 Thread mohan
Hi HansN,
Can you please push this patch.
 
 Thanks Mohan
High Availability Solutions Pvt. Ltd.
www.hasolutions.in

 
 
- Original Message - Subject: Re: [PATCH 0/4] Review Request 
for clm: add new test cases in clm apitest [#2914]
From: "Hans Nordebck" 
Date: 11/9/18 6:43 pm
To: "Mohan Kanakam" , "Anders Widell" 
, "ravisekhar.ko...@oracle.com" 

Cc: "opensaf-devel@lists.sourceforge.net" 

Hi Mohan,
 
 ack, review only/Thanks HansN
 
 On 11/6/18 11:19, Mohan Kanakam wrote:
 > Summary: clm: add new test case of API saClmClusterNotificationFree_4() of 
 > apitest [#2914]
 > Review request for Ticket(s): 2914-1
 > Peer Reviewer(s):Anders, Hans, Ravi
 > Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
 > Affected branch(es): develop
 > Development branch: ticket-2914-1
 > Base revision: f8a6848a1cdbff0b518c3db951e4689e260226c7
 > Personal repository: git://git.code.sf.net/u/mohan-hasoln/review
 >
 > 
 > Impacted area Impact y/n
 > 
 > Docs n
 > Build system n
 > RPM/packaging n
 > Configuration files n
 > Startup scripts n
 > SAF services n
 > OpenSAF services n
 > Core libraries n
 > Samples n
 > Tests y
 > Other n
 >
 >
 > Comments (indicate scope for each "y" above):
 > -
 > *** EXPLAIN/COMMENT THE PATCH SERIES HERE ***
 >
 > revision 9a6bf69135567cdceded5cd89b0a22138b7c116a
 > Author: Mohan Kanakam 
 > Date: Tue, 6 Nov 2018 15:41:15 +0530
 >
 > clm: add new test case in saClmResponse_4() of apitest [#2914]
 >
 >
 >
 > revision afd96329f2b2cd6211e0dae90a6e46881d140092
 > Author: Mohan Kanakam 
 > Date: Tue, 6 Nov 2018 15:15:32 +0530
 >
 > clm: add new test case saClmClusterNodeGetAsync() of apitest [#2914]
 >
 >
 >
 > revision 71b52f9c79477fe8ee567123b68ebf52cd6ee433
 > Author: Mohan Kanakam 
 > Date: Tue, 6 Nov 2018 15:05:34 +0530
 >
 > clm: add new test case of API saClmClusterNodeGet_4() of apitest [#2914]
 >
 >
 >
 > revision eda88ade8b2d87ba657465ef17d73cb553082551
 > Author: Mohan Kanakam 
 > Date: Tue, 6 Nov 2018 14:39:02 +0530
 >
 > clm: add new test case of API saClmClusterNotificationFree_4() of apitest 
 > [#2914]
 >
 >
 >
 > Complete diffstat:
 > --
 > src/clm/apitest/tet_saClmClusterNodeGet.cc | 21 +
 > src/clm/apitest/tet_saClmClusterNodeGetAsync.cc | 19 +++
 > src/clm/apitest/tet_saClmClusterNotificationFree.cc | 14 ++
 > src/clm/apitest/tet_saClmResponse.cc | 9 +
 > 4 files changed, 63 insertions(+)
 >
 >
 > Testing Commands:
 > -
 > ./clmtest
 >
 > Testing, Expected Results:
 > --
 > 5 PASSED saClmClusterNotificationFree with finalized handle
 > 10 PASSED/PASSED saClmClusterNodeGet & saClmClusterNodeGet_4 with Finalized 
 > handle
 > 10 PASSED/PASSED saClmClusterNodeGetAsync with finalized handle
 > 6 PASSED saClmResponse with Finalized handle
 >
 >
 > Conditions of Submission:
 > -
 > Ack from mainatiners
 >
 > Arch Built Started Linux distro
 > ---
 > mips n n
 > mips64 n n
 > x86 n n
 > x86_64 y y
 > powerpc n n
 > powerpc64 n n
 >
 >
 > Reviewer Checklist:
 > ---
 > [Submitters: make sure that your review doesn't trigger any checkmarks!]
 >
 >
 > Your checkin has not passed review because (see checked entries):
 >
 > ___ Your RR template is generally incomplete; it has too many blank entries
 > that need proper data filled in.
 >
 > ___ You have failed to nominate the proper persons for review and push.
 >
 > ___ Your patches do not have proper short+long header
 >
 > ___ You have grammar/spelling in your header that is unacceptable.
 >
 > ___ You have exceeded a sensible line length in your headers/comments/text.
 >
 > ___ You have failed to put in a proper Trac Ticket # into your commits.
 >
 > ___ You have incorrectly put/left internal data in your comments/files
 > (i.e. internal bug tracking tool IDs, product names etc)
 >
 > ___ You have not given any evidence of testing beyond basic build tests.
 > Demonstrate some level of runtime or other sanity testing.
 >
 > ___ You have ^M present in some of your files. These have to be removed.
 >
 > ___ You have needlessly changed whitespace or added whitespace crimes
 > like trailing spaces, or spaces before tabs.
 >
 > ___ You have mixed real technical changes with whitespace and other
 > cosmetic code cleanup changes. These have to be separate commits.
 >
 > ___ You need to refactor your submission into logical chunks; there is
 > too much content into a single commit.
 >
 > ___ You have extraneous garbage in your review (merge commits etc)
 >
 > ___ You have giant attachments which should never have been sent;
 > Instead you should place your content in a public tree to be pulled.
 >
 > ___ You have too many commits attached to an e-mail; resend as threaded
 > commits, or place in a public tree for a pull.
 >

Re: [devel] [PATCH 0/4] Review Request for clm: add new test cases in clm apitest [#2914]

2018-11-09 Thread Hans Nordebäck
Hi Mohan,

ack, review only/Thanks HansN

On 11/6/18 11:19, Mohan Kanakam wrote:
> Summary: clm: add new test case of API saClmClusterNotificationFree_4() of 
> apitest [#2914]
> Review request for Ticket(s): 2914-1
> Peer Reviewer(s):Anders, Hans, Ravi
> Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
> Affected branch(es): develop
> Development branch: ticket-2914-1
> Base revision: f8a6848a1cdbff0b518c3db951e4689e260226c7
> Personal repository: git://git.code.sf.net/u/mohan-hasoln/review
>
> 
> Impacted area   Impact y/n
> 
>   Docsn
>   Build systemn
>   RPM/packaging   n
>   Configuration files n
>   Startup scripts n
>   SAF servicesn
>   OpenSAF servicesn
>   Core libraries  n
>   Samples n
>   Tests   y
>   Other   n
>
>
> Comments (indicate scope for each "y" above):
> -
> *** EXPLAIN/COMMENT THE PATCH SERIES HERE ***
>
> revision 9a6bf69135567cdceded5cd89b0a22138b7c116a
> Author:   Mohan Kanakam 
> Date: Tue, 6 Nov 2018 15:41:15 +0530
>
> clm: add new test case in saClmResponse_4() of apitest [#2914]
>
>
>
> revision afd96329f2b2cd6211e0dae90a6e46881d140092
> Author:   Mohan Kanakam 
> Date: Tue, 6 Nov 2018 15:15:32 +0530
>
> clm: add new test case saClmClusterNodeGetAsync() of apitest [#2914]
>
>
>
> revision 71b52f9c79477fe8ee567123b68ebf52cd6ee433
> Author:   Mohan Kanakam 
> Date: Tue, 6 Nov 2018 15:05:34 +0530
>
> clm: add new test case of API saClmClusterNodeGet_4() of apitest [#2914]
>
>
>
> revision eda88ade8b2d87ba657465ef17d73cb553082551
> Author:   Mohan Kanakam 
> Date: Tue, 6 Nov 2018 14:39:02 +0530
>
> clm: add new test case of API saClmClusterNotificationFree_4() of apitest 
> [#2914]
>
>
>
> Complete diffstat:
> --
>   src/clm/apitest/tet_saClmClusterNodeGet.cc  | 21 
> +
>   src/clm/apitest/tet_saClmClusterNodeGetAsync.cc | 19 +++
>   src/clm/apitest/tet_saClmClusterNotificationFree.cc | 14 ++
>   src/clm/apitest/tet_saClmResponse.cc|  9 +
>   4 files changed, 63 insertions(+)
>
>
> Testing Commands:
> -
> ./clmtest
>
> Testing, Expected Results:
> --
> 5  PASSED   saClmClusterNotificationFree with finalized handle
> 10  PASSED/PASSEDsaClmClusterNodeGet & saClmClusterNodeGet_4 with 
> Finalized handle
> 10  PASSED/PASSEDsaClmClusterNodeGetAsync with finalized handle
> 6  PASSED   saClmResponse with Finalized handle
>
>
> Conditions of Submission:
> -
> Ack from mainatiners
>
> Arch  Built StartedLinux distro
> ---
> mipsn  n
> mips64  n  n
> x86 n  n
> x86_64  y  y
> powerpc n  n
> powerpc64   n  n
>
>
> Reviewer Checklist:
> ---
> [Submitters: make sure that your review doesn't trigger any checkmarks!]
>
>
> Your checkin has not passed review because (see checked entries):
>
> ___ Your RR template is generally incomplete; it has too many blank entries
>  that need proper data filled in.
>
> ___ You have failed to nominate the proper persons for review and push.
>
> ___ Your patches do not have proper short+long header
>
> ___ You have grammar/spelling in your header that is unacceptable.
>
> ___ You have exceeded a sensible line length in your headers/comments/text.
>
> ___ You have failed to put in a proper Trac Ticket # into your commits.
>
> ___ You have incorrectly put/left internal data in your comments/files
>  (i.e. internal bug tracking tool IDs, product names etc)
>
> ___ You have not given any evidence of testing beyond basic build tests.
>  Demonstrate some level of runtime or other sanity testing.
>
> ___ You have ^M present in some of your files. These have to be removed.
>
> ___ You have needlessly changed whitespace or added whitespace crimes
>  like trailing spaces, or spaces before tabs.
>
> ___ You have mixed real technical changes with whitespace and other
>  cosmetic code cleanup changes. These have to be separate commits.
>
> ___ You need to refactor your submission into logical chunks; there is
>  too much content into a single commit.
>
> ___ You have extraneous garbage in your review (merge commits etc)
>
> ___ You have giant attachments which should never have been sent;
>  Instead you should place your content in a public tree to be pulled.
>
> ___ You have too many commits attached to an e-mail; resend as threaded
>  commits, or place in a public tree for a pull.
>
> ___ You have resent this content multiple times without a clear indication
>  of what has changed between each re-send.
>
> ___ You have failed to adequately and individually 

[devel] [PATCH 0/5] Review Request for ntf: add new test cases in apitest [#2958]

2018-11-09 Thread Mohan Kanakam
Summary: ntf: add new test case of API saNtfInitialize() of apitest [#2958]
Review request for Ticket(s): 2958
Peer Reviewer(s):minh 
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-2958
Base revision: f8a6848a1cdbff0b518c3db951e4689e260226c7
Personal repository: git://git.code.sf.net/u/mohan-hasoln/review


Impacted area   Impact y/n

 Docsn
 Build systemn
 RPM/packaging   n
 Configuration files n
 Startup scripts n
 SAF servicesn
 OpenSAF servicesn
 Core libraries  n
 Samples n
 Tests   y
 Other   n


Comments (indicate scope for each "y" above):
-
*** EXPLAIN/COMMENT THE PATCH SERIES HERE ***

revision ebef37fa591d4e63ee7de9ea4098000a3256b208
Author: Mohan Kanakam 
Date:   Fri, 9 Nov 2018 17:19:08 +0530

ntf: add new test case of API saNtfNotificationReadFinalize() of apitest [#2958]



revision c716e7524263131754a26b61cd305988d97a206c
Author: Mohan Kanakam 
Date:   Fri, 9 Nov 2018 17:16:38 +0530

ntf: add new test case of API saNtfFinalize() of apitest [#2958]



revision cf271ad8784141560fdc6e616c5920b2fe975928
Author: Mohan Kanakam 
Date:   Fri, 9 Nov 2018 17:14:20 +0530

ntf: add new test case of API saNtfDispatch() of apitest [#2958]



revision 84f64a6aaa9b45ef55261764a52386030bfd0830
Author: Mohan Kanakam 
Date:   Fri, 9 Nov 2018 17:12:01 +0530

ntf: add new test case of API saNtfSelectionObjectGet() of apitest [#2958]



revision 176eb07f6e212334517af33879d085932324d4ef
Author: Mohan Kanakam 
Date:   Fri, 9 Nov 2018 17:08:57 +0530

ntf: add new test case of API saNtfInitialize() of apitest [#2958]



Complete diffstat:
--
 src/ntf/apitest/tet_saNtfDispatch.cc | 10 ++
 src/ntf/apitest/tet_saNtfFinalize.cc |  7 +++
 src/ntf/apitest/tet_saNtfInitialize.cc   |  8 
 src/ntf/apitest/tet_saNtfNotificationReadFinalize.cc |  7 +++
 src/ntf/apitest/tet_saNtfSelectionObjectGet.cc   | 11 +++
 5 files changed, 43 insertions(+)


Testing Commands:
-
./ntftest

Testing, Expected Results:
--
13  PASSED   saNtfInitialize with NULL pointer to handle AND NULL callbacks and 
unintilized version
5  PASSED   saNtfSelectionObjectGet Finalized handle SA_AIS_ERR_BAD_HANDLE
4  PASSED   saNtfDispatch - Fianlized handle SA_AIS_ERR_BAD_HANDLE
6  PASSED   saNtfFinalize SA_AIS_ERR_BAD_HANDLE - unintilized handle
2  PASSED   saNtfNotificationReadFinalize SA_AIS_ERR_BAD_HANDLE

Conditions of Submission:
-
Ack from maintainers

Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  y  y
powerpc n  n
powerpc64   n  n


Reviewer Checklist:
---
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
(i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
comments and change requests that were proposed in 

[devel] [PATCH 3/5] ntf: add new test case of API saNtfDispatch() of apitest [#2958]

2018-11-09 Thread Mohan Kanakam
---
 src/ntf/apitest/tet_saNtfDispatch.cc | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/ntf/apitest/tet_saNtfDispatch.cc 
b/src/ntf/apitest/tet_saNtfDispatch.cc
index 5fea4ef..81a722c 100644
--- a/src/ntf/apitest/tet_saNtfDispatch.cc
+++ b/src/ntf/apitest/tet_saNtfDispatch.cc
@@ -40,6 +40,14 @@ void saNtfDispatch_03(void) {
   test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
 }
 
+void saNtfDispatch_04(void) {
+  safassert(NtfTest::saNtfInitialize(, , ),
+  SA_AIS_OK);
+  safassert(NtfTest::saNtfFinalize(ntfHandle), SA_AIS_OK);
+  rc = NtfTest::saNtfDispatch(ntfHandle, SA_DISPATCH_ALL);
+  test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
+}
+
 __attribute__((constructor)) static void saNtfDispatch_constructor(void) {
   test_suite_add(4, "Life cycle, dispatch, API 4");
   test_case_add(4, saNtfDispatch_01,
@@ -48,4 +56,6 @@ __attribute__((constructor)) static void 
saNtfDispatch_constructor(void) {
   "saNtfDispatch - invalid handle SA_AIS_ERR_BAD_HANDLE");
   test_case_add(4, saNtfDispatch_03,
   "saNtfDispatch - zero flag SA_AIS_ERR_INVALID_PARAM");
+  test_case_add(4, saNtfDispatch_03,
+  "saNtfDispatch - Fianlized handle SA_AIS_ERR_BAD_HANDLE");
 }
-- 
2.7.4



___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 2/5] ntf: add new test case of API saNtfSelectionObjectGet() of apitest [#2958]

2018-11-09 Thread Mohan Kanakam
---
 src/ntf/apitest/tet_saNtfSelectionObjectGet.cc | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/ntf/apitest/tet_saNtfSelectionObjectGet.cc 
b/src/ntf/apitest/tet_saNtfSelectionObjectGet.cc
index 6da2c78..c4ca1c8 100644
--- a/src/ntf/apitest/tet_saNtfSelectionObjectGet.cc
+++ b/src/ntf/apitest/tet_saNtfSelectionObjectGet.cc
@@ -51,6 +51,14 @@ void saNtfSelectionObjectGet_04(void) {
   test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
 }
 
+void saNtfSelectionObjectGet_05(void) {
+  safassert(NtfTest::saNtfInitialize(, , ),
+  SA_AIS_OK);
+  safassert(NtfTest::saNtfFinalize(ntfHandle), SA_AIS_OK);
+  rc = saNtfSelectionObjectGet(ntfHandle, );
+  test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
+}
+
 __attribute__((constructor)) static void
 saNtfSelectionObjectGet_constructor(void) {
   test_suite_add(3, "Life cycle, selectObject, API 3");
@@ -65,4 +73,7 @@ saNtfSelectionObjectGet_constructor(void) {
   test_case_add(
   3, saNtfSelectionObjectGet_03,
   "saNtfSelectionObjectGet NULL selectionObject SA_AIS_ERR_INVALID_PARAM");
+  test_case_add(
+  3, saNtfSelectionObjectGet_05,
+  "saNtfSelectionObjectGet Finalized handle SA_AIS_ERR_BAD_HANDLE");
 }
-- 
2.7.4



___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 4/5] ntf: add new test case of API saNtfFinalize() of apitest [#2958]

2018-11-09 Thread Mohan Kanakam
---
 src/ntf/apitest/tet_saNtfFinalize.cc | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/ntf/apitest/tet_saNtfFinalize.cc 
b/src/ntf/apitest/tet_saNtfFinalize.cc
index 84cd846..adf2167 100644
--- a/src/ntf/apitest/tet_saNtfFinalize.cc
+++ b/src/ntf/apitest/tet_saNtfFinalize.cc
@@ -151,6 +151,11 @@ void saNtfFinalize_05() {
   test_validate(ret1, SA_AIS_OK);
 }
 
+void saNtfFinalize_06(void) {
+  rc = NtfTest::saNtfFinalize(ntfHandle);
+  test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
+}
+
 __attribute__((constructor)) static void saNtfFinalize_constructor(void) {
   test_suite_add(2, "Life cycle, finalize, API 2");
   test_case_add(2, saNtfFinalize_01, "saNtfFinalize SA_AIS_OK");
@@ -163,4 +168,6 @@ __attribute__((constructor)) static void 
saNtfFinalize_constructor(void) {
   test_case_add(2, saNtfFinalize_05,
   "Finalize and saNtfStateChangeNotificationAllocate in parallel "
   "SA_AIS_OK");
+  test_case_add(2, saNtfFinalize_06,
+  "saNtfFinalize SA_AIS_ERR_BAD_HANDLE - unintilized handle");
 }
-- 
2.7.4



___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1/5] ntf: add new test case of API saNtfInitialize() of apitest [#2958]

2018-11-09 Thread Mohan Kanakam
---
 src/ntf/apitest/tet_saNtfInitialize.cc | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/ntf/apitest/tet_saNtfInitialize.cc 
b/src/ntf/apitest/tet_saNtfInitialize.cc
index 8538193..c1442dc 100644
--- a/src/ntf/apitest/tet_saNtfInitialize.cc
+++ b/src/ntf/apitest/tet_saNtfInitialize.cc
@@ -117,6 +117,11 @@ void saNtfInitialize_12(void) {
   test_validate(rc, SA_AIS_ERR_VERSION);
 }
 
+void saNtfInitialize_13(void) {
+  rc = NtfTest::saNtfInitialize(NULL, NULL, NULL);
+  test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
+}
+
 __attribute__((constructor)) static void saNtfInitialize_constructor(void) {
   test_suite_add(1, "Life cycle, initialize, API 1");
   test_case_add(1, saNtfInitialize_01, "saNtfInitialize SA_AIS_OK");
@@ -142,4 +147,7 @@ __attribute__((constructor)) static void 
saNtfInitialize_constructor(void) {
   "saNtfInitialize with major version set to lower");
   test_case_add(1, saNtfInitialize_12,
   "saNtfInitialize with version A.0.0");
+  test_case_add(1, saNtfInitialize_13,
+  "saNtfInitialize with NULL pointer to handle AND NULL callbacks"
+  " and unintilized version");
 }
-- 
2.7.4



___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 5/5] ntf: add new test case of API saNtfNotificationReadFinalize() of apitest [#2958]

2018-11-09 Thread Mohan Kanakam
---
 src/ntf/apitest/tet_saNtfNotificationReadFinalize.cc | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/src/ntf/apitest/tet_saNtfNotificationReadFinalize.cc 
b/src/ntf/apitest/tet_saNtfNotificationReadFinalize.cc
index 531afd2..d0260aa 100644
--- a/src/ntf/apitest/tet_saNtfNotificationReadFinalize.cc
+++ b/src/ntf/apitest/tet_saNtfNotificationReadFinalize.cc
@@ -79,9 +79,16 @@ void saNtfNotificationReadFinalize_01(void) {
   test_validate(rc, SA_AIS_OK);
 }
 
+void saNtfNotificationReadFinalize_02(void) {
+  rc = NtfTest::saNtfNotificationReadFinalize(-1);
+  test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
+}
+
 __attribute__((constructor)) static void
 saNtfNotificationReadFinalize_constructor(void) {
   test_suite_add(21, "Consumer operations - Reader API 2");
   test_case_add(21, saNtfNotificationReadFinalize_01,
   "saNtfNotificationReadFinalize SA_AIS_OK");
+  test_case_add(21, saNtfNotificationReadFinalize_02,
+  "saNtfNotificationReadFinalize SA_AIS_ERR_BAD_HANDLE");
 }
-- 
2.7.4



___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] osaf: Set sticky bit for socket and pipe files [#2953]

2018-11-09 Thread Hans Nordebäck
Hi Minh,

the "sticky" bit here is in fact  the "restricted deletion bit", it is 
used on directories,

e.g. the /tmp directory where several users have r/w access but when the 
't' bit is

set only the file owners may delete its files. It should not be set on 
files only directories

and I don't think it is need here. /Thanks HansN

On 11/5/18 09:56, Minh Anh Du wrote:
> There are files, sockets and pipes have world writable permission,
> but only root user and owner should be able to create/delete
> these files. Sticky bit should be set for these sockets and pipes
> for security reason.
> ---
>   src/base/daemon.c   | 2 +-
>   src/base/osaf_secutil.c | 2 +-
>   src/dtm/transport/log_server.cc | 2 +-
>   src/nid/agent/nid_ipc.c | 2 +-
>   4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/base/daemon.c b/src/base/daemon.c
> index cdde7fd..50ddc50 100644
> --- a/src/base/daemon.c
> +++ b/src/base/daemon.c
> @@ -162,7 +162,7 @@ static void create_fifofile(const char *fifofile)
>   
>   mask = umask(0);
>   
> - if (mkfifo(fifofile, 0666) == -1) {
> + if (mkfifo(fifofile, 01666) == -1) {
>   if (errno == EEXIST) {
>   syslog(LOG_INFO, "mkfifo already exists: %s %s",
>  fifofile, strerror(errno));
> diff --git a/src/base/osaf_secutil.c b/src/base/osaf_secutil.c
> index 0e175c9..71e512a 100644
> --- a/src/base/osaf_secutil.c
> +++ b/src/base/osaf_secutil.c
> @@ -147,7 +147,7 @@ static int server_sock_create(const char *pathname)
>   }
>   
>   /* Connecting to the socket object requires read/write permission. */
> - if (chmod(pathname, 0777) == -1) {
> + if (chmod(pathname, 01777) == -1) {
>   LOG_ER("%s: chmod failed - %s", __FUNCTION__, strerror(errno));
>   return -1;
>   }
> diff --git a/src/dtm/transport/log_server.cc b/src/dtm/transport/log_server.cc
> index bef1f07..866fe59 100644
> --- a/src/dtm/transport/log_server.cc
> +++ b/src/dtm/transport/log_server.cc
> @@ -35,7 +35,7 @@ LogServer::LogServer(int term_fd)
> max_backups_{9},
> max_file_size_{5 * 1024 * 1024},
> log_socket_{Osaflog::kServerSocketPath, 
> base::UnixSocket::kNonblocking,
> -  0777},
> +  01777},
> log_streams_{},
> current_stream_{new LogStream{kMdsLogStreamName, 1, 5 * 1024 * 1024}},
> no_of_log_streams_{1} {
> diff --git a/src/nid/agent/nid_ipc.c b/src/nid/agent/nid_ipc.c
> index 172063a..eae8de3 100644
> --- a/src/nid/agent/nid_ipc.c
> +++ b/src/nid/agent/nid_ipc.c
> @@ -66,7 +66,7 @@ uint32_t nid_create_ipc(char *strbuf)
>   mask = umask(0);
>   
>   /* Create nid fifo */
> - if (mkfifo(NID_FIFO, 0666) < 0) {
> + if (mkfifo(NID_FIFO, 01666) < 0) {
>   sprintf(strbuf, " FAILURE: Unable To Create FIFO Error:%s\n",
>   strerror(errno));
>   umask(mask);

___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel