<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/nfs-utils.git, branch baserock/master</title>
<subtitle>git.linux-nfs.org: projects/steved/nfs-utils.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/'/>
<entry>
<title>mountd: fix segfault in add_name with newer gcc compilers</title>
<updated>2015-04-23T06:13:51+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@poochiereds.net</email>
</author>
<published>2014-05-01T15:15:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=0da9f20a22bb32b2da6b587b4e85dafde087c0f7'/>
<id>0da9f20a22bb32b2da6b587b4e85dafde087c0f7</id>
<content type='text'>
I hit a segfault in add_name with a mountd built with gcc-4.9.0. Some
NULL pointer checks got reordered such that a pointer was dereferenced
before checking to see whether it was NULL. The problem was due to
nfs-utils relying on undefined behavior, which tricked gcc into assuming
that the pointer would never be NULL.

At first I assumed that this was a compiler bug, but Jakub Jelinek and
Jeff Law pointed out:

"If old is NULL, then:

	strncpy(new, old, cp-old);

is undefined behavior (even when cp == old == NULL in that case),
therefore gcc assumes that old is never NULL, as otherwise it would be
invalid.

Just guard
	strncpy(new, old, cp-old);
	new[cp-old] = 0;
with if (old) { ... }."

This patch does that. If old is NULL though, then we still need to
ensure that new is NULL terminated, lest the subsequent strcats walk off
the end of it.

Cc: Jeff Law &lt;law@redhat.com&gt;
Cc: Jakub Jelinek &lt;jakub@redhat.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@poochiereds.net&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I hit a segfault in add_name with a mountd built with gcc-4.9.0. Some
NULL pointer checks got reordered such that a pointer was dereferenced
before checking to see whether it was NULL. The problem was due to
nfs-utils relying on undefined behavior, which tricked gcc into assuming
that the pointer would never be NULL.

At first I assumed that this was a compiler bug, but Jakub Jelinek and
Jeff Law pointed out:

"If old is NULL, then:

	strncpy(new, old, cp-old);

is undefined behavior (even when cp == old == NULL in that case),
therefore gcc assumes that old is never NULL, as otherwise it would be
invalid.

Just guard
	strncpy(new, old, cp-old);
	new[cp-old] = 0;
with if (old) { ... }."

This patch does that. If old is NULL though, then we still need to
ensure that new is NULL terminated, lest the subsequent strcats walk off
the end of it.

Cc: Jeff Law &lt;law@redhat.com&gt;
Cc: Jakub Jelinek &lt;jakub@redhat.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@poochiereds.net&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Install nfs-mountd.service along with the other systemd unit files</title>
<updated>2012-12-28T21:33:50+00:00</updated>
<author>
<name>Jannis Pohlmann</name>
<email>jannis.pohlmann@codethink.co.uk</email>
</author>
<published>2012-12-28T21:33:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=08baf3bc2f66a1ca6401191e19380028d2fc2c6d'/>
<id>08baf3bc2f66a1ca6401191e19380028d2fc2c6d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix nfs-server.service</title>
<updated>2012-12-28T16:17:02+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2012-12-28T16:17:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=baccffe5367d108f50c61be5095d10e71cec1c60'/>
<id>baccffe5367d108f50c61be5095d10e71cec1c60</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix unit files</title>
<updated>2012-11-27T15:55:34+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2012-11-27T15:55:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=dede9e09e8587586a35dbd2ebd39a47eec9fb620'/>
<id>dede9e09e8587586a35dbd2ebd39a47eec9fb620</id>
<content type='text'>
ExecStartPost should not be used to start rpc.mountd; it must have
its own .service file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ExecStartPost should not be used to start rpc.mountd; it must have
its own .service file.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add systemd unit definitions</title>
<updated>2012-11-19T18:28:08+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2012-11-19T18:17:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=57fda388539439eacd155e9e5dba5c061934f83d'/>
<id>57fda388539439eacd155e9e5dba5c061934f83d</id>
<content type='text'>
These are borrowed from Fedora

No secure NFS service exists, because we don't yet build with rpcgss.
The lockd does not have a service file, because it's largely useless[1].

1. http://www.time-travellers.org/shane/papers/NFS_considered_harmful.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are borrowed from Fedora

No secure NFS service exists, because we don't yet build with rpcgss.
The lockd does not have a service file, because it's largely useless[1].

1. http://www.time-travellers.org/shane/papers/NFS_considered_harmful.html
</pre>
</div>
</content>
</entry>
<entry>
<title>No fun without TI-RPC</title>
<updated>2012-11-16T17:35:07+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2012-11-16T17:35:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=d726640ad4ecc22fd09a5af3cc3d46d3b0fd03d3'/>
<id>d726640ad4ecc22fd09a5af3cc3d46d3b0fd03d3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use internal rpcgen</title>
<updated>2012-11-16T17:11:02+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2012-11-16T17:11:02+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=a5333d643bff4b0b0363454a96d5b16fbc5aaca7'/>
<id>a5333d643bff4b0b0363454a96d5b16fbc5aaca7</id>
<content type='text'>
Fixes a build issue.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes a build issue.
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable more stuff</title>
<updated>2012-11-16T17:00:57+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2012-11-16T17:00:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=b541c236e97db7a2c613faf74c0f0808c065848a'/>
<id>b541c236e97db7a2c613faf74c0f0808c065848a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix JSON typo</title>
<updated>2012-11-16T16:54:31+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2012-11-16T16:54:31+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=0f4ecc5f039cdbc6d1ebb9c06043ecdb36a92422'/>
<id>0f4ecc5f039cdbc6d1ebb9c06043ecdb36a92422</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add morphology; disable nfsv4 support (extra dependencies)</title>
<updated>2012-11-16T16:46:36+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2012-11-16T16:46:31+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/nfs-utils.git/commit/?id=f5af4873c2f3d3411be96e77c600702ac41b43bd'/>
<id>f5af4873c2f3d3411be96e77c600702ac41b43bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
