<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/mgmt/glusterd, branch v6dev</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>Land part 2 of clang-format changes</title>
<updated>2018-09-12T12:22:45+00:00</updated>
<author>
<name>Gluster Ant</name>
<email>bugzilla-bot@gluster.org</email>
</author>
<published>2018-09-12T12:22:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=e16868dede6455cab644805af6fe1ac312775e13'/>
<id>e16868dede6455cab644805af6fe1ac312775e13</id>
<content type='text'>
Change-Id: Ia84cc24c8924e6d22d02ac15f611c10e26db99b4
Signed-off-by: Nigel Babu &lt;nigelb@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ia84cc24c8924e6d22d02ac15f611c10e26db99b4
Signed-off-by: Nigel Babu &lt;nigelb@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Land clang-format changes</title>
<updated>2018-09-12T11:52:48+00:00</updated>
<author>
<name>Gluster Ant</name>
<email>bugzilla-bot@gluster.org</email>
</author>
<published>2018-09-12T11:52:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=45a71c0548b6fd2c757aa2e7b7671a1411948894'/>
<id>45a71c0548b6fd2c757aa2e7b7671a1411948894</id>
<content type='text'>
Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b
</pre>
</div>
</content>
</entry>
<entry>
<title>mgmt xlators: store boolean fields using integer</title>
<updated>2018-09-11T07:10:48+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-09-10T14:04:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=8ac8f359b24c8583eb1a15b9926929770b869db8'/>
<id>8ac8f359b24c8583eb1a15b9926929770b869db8</id>
<content type='text'>
Surprisingly, there is not set_boolean() as there is a get_boolean()
In fact, it is stored as an INT dictionary type.

In some occasions it was stored using a string, and this caused
errors such as:
key gfproxy-server, integer type asked, has string type [Invalid argument]

I've fixed what I saw in some logs, I'm sure there are more.
The CORRECT fix is to create a boolean set and use it, but this
requires a bit more work. I'll see if I can do it later on.

Only compile-tested!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I45fd0c7a0824b2f42b8ce510296c9dfa4f32ad66
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Surprisingly, there is not set_boolean() as there is a get_boolean()
In fact, it is stored as an INT dictionary type.

In some occasions it was stored using a string, and this caused
errors such as:
key gfproxy-server, integer type asked, has string type [Invalid argument]

I've fixed what I saw in some logs, I'm sure there are more.
The CORRECT fix is to create a boolean set and use it, but this
requires a bit more work. I'll see if I can do it later on.

Only compile-tested!

updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;

Change-Id: I45fd0c7a0824b2f42b8ce510296c9dfa4f32ad66
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: NULL pointer dereferencing clang fix</title>
<updated>2018-09-11T05:57:54+00:00</updated>
<author>
<name>Harpreet Lalwani</name>
<email>hlalwani@redhat.com</email>
</author>
<published>2018-09-10T06:07:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=170e848b940615eb9f366211d7a79cc3033902cb'/>
<id>170e848b940615eb9f366211d7a79cc3033902cb</id>
<content type='text'>
problem: NULL point dereferencing

solution: Adding a conditional statement before and then dereferencing it.

Updates: bz#1622665

Change-Id: I562ca90aebf2a4882cfea10114a90364d9ef1996
Signed-off-by: Harpreet Lalwani &lt;hlalwani@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
problem: NULL point dereferencing

solution: Adding a conditional statement before and then dereferencing it.

Updates: bz#1622665

Change-Id: I562ca90aebf2a4882cfea10114a90364d9ef1996
Signed-off-by: Harpreet Lalwani &lt;hlalwani@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mgmt/glusterd : Fix coverity issue</title>
<updated>2018-09-11T02:32:47+00:00</updated>
<author>
<name>Ashish Pandey</name>
<email>aspandey@redhat.com</email>
</author>
<published>2018-09-10T11:05:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=23fa1feaf0a3ab482628ab5b7b950d27e57fb46d'/>
<id>23fa1feaf0a3ab482628ab5b7b950d27e57fb46d</id>
<content type='text'>
CID: 727146, 727066

https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=85393035&amp;defectInstanceId=26034751&amp;mergedDefectId=727146
https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=85392913&amp;defectInstanceId=26034571&amp;mergedDefectId=727066

updates: bz#789278

Change-Id: Ieaef33829ec88e68690dabce4ea21d2e61dad9f6
Signed-off-by: Ashish Pandey &lt;aspandey@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CID: 727146, 727066

https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=85393035&amp;defectInstanceId=26034751&amp;mergedDefectId=727146
https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=85392913&amp;defectInstanceId=26034571&amp;mergedDefectId=727066

updates: bz#789278

Change-Id: Ieaef33829ec88e68690dabce4ea21d2e61dad9f6
Signed-off-by: Ashish Pandey &lt;aspandey@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: NULL pointer dereferencing clang fix</title>
<updated>2018-09-11T02:26:44+00:00</updated>
<author>
<name>Sheetal Pamecha</name>
<email>sheetal.pamecha08@gmail.com</email>
</author>
<published>2018-09-10T05:31:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=3114c4a10672a70c8964c8cfce2ca0cc1e835a9f'/>
<id>3114c4a10672a70c8964c8cfce2ca0cc1e835a9f</id>
<content type='text'>
Added ternary operator to avoid NULL pointer dereferencing

Updates: bz#1622665

Change-Id: I4b970176b6b555c2eda1da2848c493e45b1e4217
Signed-off-by: Sheetal Pamecha &lt;sheetal.pamecha08@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added ternary operator to avoid NULL pointer dereferencing

Updates: bz#1622665

Change-Id: I4b970176b6b555c2eda1da2848c493e45b1e4217
Signed-off-by: Sheetal Pamecha &lt;sheetal.pamecha08@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: Fix unused value coverity fix</title>
<updated>2018-09-09T17:33:24+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2018-09-09T17:24:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=15d2b3cf8595de176b47f97ed92b4f8653af2e60'/>
<id>15d2b3cf8595de176b47f97ed92b4f8653af2e60</id>
<content type='text'>
Commit 09198e203e has introduced a new coverity with ID 1395635.
keylen variable is assigned to some value but stored value is
overwritten before it is used. This patch addresses the issue.

updates: bz#789278
Change-Id: Ice290dcb9d703cd2131b0f0803436660e670e10a
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 09198e203e has introduced a new coverity with ID 1395635.
keylen variable is assigned to some value but stored value is
overwritten before it is used. This patch addresses the issue.

updates: bz#789278
Change-Id: Ice290dcb9d703cd2131b0f0803436660e670e10a
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Some (mgmt) xlators: use dict_{setn|getn|deln|get_int32n|set_int32n|set_strn}</title>
<updated>2018-09-09T01:53:59+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-09-03T10:55:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=09198e203ece6925791a8a3a6121c5f808e4e873'/>
<id>09198e203ece6925791a8a3a6121c5f808e4e873</id>
<content type='text'>
In a previous patch (https://review.gluster.org/20769) we've
added the key length to be passed to dict_* funcs, to remove the need
to strlen() it. This patch moves some xlators to use it.

- It also adds dict_get_int32n which was missing.
- It also reduces the size of some key variables.
They were set to 1024b or PATH_MAX, where sometimes 64 bytes were
really enough.

Please review carefully:
1. That I did not reduce some the size of the key variables too much.
2. That I did not mix up some keys.

Compile-tested only!

Change-Id: Ic729baf179f40e8d02bc2350491d4bb9b6934266
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a previous patch (https://review.gluster.org/20769) we've
added the key length to be passed to dict_* funcs, to remove the need
to strlen() it. This patch moves some xlators to use it.

- It also adds dict_get_int32n which was missing.
- It also reduces the size of some key variables.
They were set to 1024b or PATH_MAX, where sometimes 64 bytes were
really enough.

Please review carefully:
1. That I did not reduce some the size of the key variables too much.
2. That I did not mix up some keys.

Compile-tested only!

Change-Id: Ic729baf179f40e8d02bc2350491d4bb9b6934266
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterd: avoid using glusterd's working directory as a brick</title>
<updated>2018-09-08T13:37:06+00:00</updated>
<author>
<name>Sanju Rakonde</name>
<email>srakonde@redhat.com</email>
</author>
<published>2018-09-03T10:56:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=44e4db05a953a6f231c62225b462470cacb16bd4'/>
<id>44e4db05a953a6f231c62225b462470cacb16bd4</id>
<content type='text'>
Adding checks for avoiding glusterd's working directory used as
a brick for volume creation.

fixes: bz#853601
Change-Id: I4b16a05f752e92216aa628f542a4fdbf59b3c669
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding checks for avoiding glusterd's working directory used as
a brick for volume creation.

fixes: bz#853601
Change-Id: I4b16a05f752e92216aa628f542a4fdbf59b3c669
Signed-off-by: Sanju Rakonde &lt;srakonde@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>multiple xlators (mgmt): strncpy()-&gt;sprintf(), reduce strlen()'s</title>
<updated>2018-09-07T16:17:18+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2018-08-21T17:41:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=a880d6f6aa7a2979df8aa32b58f716ef0c578d3f'/>
<id>a880d6f6aa7a2979df8aa32b58f716ef0c578d3f</id>
<content type='text'>
xlators/mgmt/glusterd/src/glusterd-geo-rep.c
xlators/mgmt/glusterd/src/glusterd-handshake.c
xlators/mgmt/glusterd/src/glusterd-sm.c
xlators/mgmt/glusterd/src/glusterd-store.c
xlators/mgmt/glusterd/src/glusterd-utils.c
xlators/mgmt/glusterd/src/glusterd-volgen.c
xlators/mgmt/glusterd/src/glusterd-volume-ops.c
xlators/mgmt/glusterd/src/glusterd.c

strncpy may not be very efficient for short strings copied into
a large buffer: If the length of src is less than n,
strncpy() writes additional null bytes to dest to ensure
that a total of n bytes are written.

Instead, use snprintf(). Try to ensure output is not
truncated.

Also:
- save the result of strlen() and re-use it when possible.
- move from strlen to SLEN (sizeof() ) for const strings.

Compile-tested only!

Change-Id: Ib5d001857236f43e41c4a51b5f48e1a33110aaeb
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
xlators/mgmt/glusterd/src/glusterd-geo-rep.c
xlators/mgmt/glusterd/src/glusterd-handshake.c
xlators/mgmt/glusterd/src/glusterd-sm.c
xlators/mgmt/glusterd/src/glusterd-store.c
xlators/mgmt/glusterd/src/glusterd-utils.c
xlators/mgmt/glusterd/src/glusterd-volgen.c
xlators/mgmt/glusterd/src/glusterd-volume-ops.c
xlators/mgmt/glusterd/src/glusterd.c

strncpy may not be very efficient for short strings copied into
a large buffer: If the length of src is less than n,
strncpy() writes additional null bytes to dest to ensure
that a total of n bytes are written.

Instead, use snprintf(). Try to ensure output is not
truncated.

Also:
- save the result of strlen() and re-use it when possible.
- move from strlen to SLEN (sizeof() ) for const strings.

Compile-tested only!

Change-Id: Ib5d001857236f43e41c4a51b5f48e1a33110aaeb
updates: bz#1193929
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
