<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nfs-utils.git/support, branch gss-fixes</title>
<subtitle>NFS utils related patches</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/'/>
<entry>
<title>nfsd: fix minorversion-choosing interface</title>
<updated>2014-01-07T20:57:48+00:00</updated>
<author>
<name>J. Bruce Fields</name>
<email>bfields@redhat.com</email>
</author>
<published>2014-01-07T20:37:58+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=93648ecc10bae7ed542056abb55f4b8f10ddbbb9'/>
<id>93648ecc10bae7ed542056abb55f4b8f10ddbbb9</id>
<content type='text'>
From: "J. Bruce Fields" &lt;bfields@redhat.com&gt;

By unconditionally adding ?4.2 to the version string written to the
kernel we make nfs-utils incompatible with pre-4.2-supporting kernels.

Ditto for 4.1.  This problem was introduced by
12a590f8d556c00a9502eeebaa763d906222d521 "rpc.nfsd: Allow v4.2 server
support with the -V option", which also change nfsd to unconditionally
pass ?4.2.

Instead, just don't mention 4.1 or 4.2 unless the commandline has
specifically requested that one or the other be turned on or off.

Tested-by: Joakim Tjernlund &lt;joakim.tjernlund@transmode.se&gt;
Reported-by: Joakim Tjernlund &lt;joakim.tjernlund@transmode.se&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From: "J. Bruce Fields" &lt;bfields@redhat.com&gt;

By unconditionally adding ?4.2 to the version string written to the
kernel we make nfs-utils incompatible with pre-4.2-supporting kernels.

Ditto for 4.1.  This problem was introduced by
12a590f8d556c00a9502eeebaa763d906222d521 "rpc.nfsd: Allow v4.2 server
support with the -V option", which also change nfsd to unconditionally
pass ?4.2.

Instead, just don't mention 4.1 or 4.2 unless the commandline has
specifically requested that one or the other be turned on or off.

Tested-by: Joakim Tjernlund &lt;joakim.tjernlund@transmode.se&gt;
Reported-by: Joakim Tjernlund &lt;joakim.tjernlund@transmode.se&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs-utils: consolidate mydaemon() and release_parent() implementations</title>
<updated>2013-11-20T20:04:47+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2013-11-20T20:00:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=6a46d870c61433c8dea0270d9c10702b7b4b3d99'/>
<id>6a46d870c61433c8dea0270d9c10702b7b4b3d99</id>
<content type='text'>
We currently have 2 cut-and-paste versions of this code. One for idmapd
and one for svcgssd.[1]

The two are basically equivalent but there are some small differences,
mostly related to how errors in that function are logged. svcgssd uses
printerr() with a priority of 1, which only prints errors if -v was
specified. That doesn't seem to be quite right. Daemonizing errors are
necessarily fatal and should be logged as such. The one for idmapd uses
err(), which always prints to stderr even though we have the xlog
facility set up. Since both have xlog configured at this point, log the
errors using xlog_err() instead.

The only other significant difference I see is that the idmapd version
will open "/" if it's unable to open "/dev/null". I believe that however
was a holdover from an earlier version of that function that did not
error out when we were unable to open a file descriptor. Since the
function does that now, I don't believe we need that fallback anymore.

[1]: technically, we have a third in statd too, but it's different
     enough that I don't want to touch it here.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We currently have 2 cut-and-paste versions of this code. One for idmapd
and one for svcgssd.[1]

The two are basically equivalent but there are some small differences,
mostly related to how errors in that function are logged. svcgssd uses
printerr() with a priority of 1, which only prints errors if -v was
specified. That doesn't seem to be quite right. Daemonizing errors are
necessarily fatal and should be logged as such. The one for idmapd uses
err(), which always prints to stderr even though we have the xlog
facility set up. Since both have xlog configured at this point, log the
errors using xlog_err() instead.

The only other significant difference I see is that the idmapd version
will open "/" if it's unable to open "/dev/null". I believe that however
was a holdover from an earlier version of that function that did not
error out when we were unable to open a file descriptor. Since the
function does that now, I don't believe we need that fallback anymore.

[1]: technically, we have a third in statd too, but it's different
     enough that I don't want to touch it here.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mountd: Add the ability to disable UDP listeners.</title>
<updated>2013-11-05T19:11:44+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2013-11-05T19:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=ff948a50ef1013d7caa5d66e5534f69a94ec1c88'/>
<id>ff948a50ef1013d7caa5d66e5534f69a94ec1c88</id>
<content type='text'>
Add the ability to turn off UDP listeners with the
new "-u | --no-udp" flag.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the ability to turn off UDP listeners with the
new "-u | --no-udp" flag.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mountd: Use protocol bit fields to turn protocols off.</title>
<updated>2013-11-05T19:10:05+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2013-11-05T19:10:05+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=a80482157632584ee03df58ed1eef3cefd95bbcb'/>
<id>a80482157632584ee03df58ed1eef3cefd95bbcb</id>
<content type='text'>
Convert the current code to used the NFSCTL_XXX macros
to turn off the TCP listener.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert the current code to used the NFSCTL_XXX macros
to turn off the TCP listener.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>exportfs: exit with error code if there was any error (take 2).</title>
<updated>2013-11-05T19:03:53+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-11-05T19:03:53+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=d4a408776d611cd62235232d65d488d02fca78e4'/>
<id>d4a408776d611cd62235232d65d488d02fca78e4</id>
<content type='text'>
exportfs currently exits with a non-zero error for some errors,
but not for others.

It does this by having various support routines set the global
variable "export_errno".

Change this to have 'xlog' set export_errno if an ERROR is
reported.  That way all errors will be caught.

Note that the exit error code is changed from 22 (EINVAL)
to the more traditional '1'.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
exportfs currently exits with a non-zero error for some errors,
but not for others.

It does this by having various support routines set the global
variable "export_errno".

Change this to have 'xlog' set export_errno if an ERROR is
reported.  That way all errors will be caught.

Note that the exit error code is changed from 22 (EINVAL)
to the more traditional '1'.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Stop Treat IP addresses a FQDN rather than SUBNETs.</title>
<updated>2013-10-24T20:06:10+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-10-24T19:58:45+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=8a5da2b392bc25feb58a9de11cac411f5f8473bb'/>
<id>8a5da2b392bc25feb58a9de11cac411f5f8473bb</id>
<content type='text'>
I think there was a reason for this many years ago,
but I can not find any evidence that it ever really did
anything useful and it certainly doesn't seem to now.

And the documentation suggests that IP address take precedence over
SUBNETs, and that can only happen if they are treated as MCL_FQDN.

So remove this apparently pointless code.

Reported-and-tested-by: Wangminlan &lt;wangminlan@huawei.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&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 think there was a reason for this many years ago,
but I can not find any evidence that it ever really did
anything useful and it certainly doesn't seem to now.

And the documentation suggests that IP address take precedence over
SUBNETs, and that can only happen if they are treated as MCL_FQDN.

So remove this apparently pointless code.

Reported-and-tested-by: Wangminlan &lt;wangminlan@huawei.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>exportfs: exit with error code if there was any error.</title>
<updated>2013-10-22T08:36:54+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2013-10-22T08:36:54+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=232eb7ad09f9fd2ae4918699f850e4f8cadc2632'/>
<id>232eb7ad09f9fd2ae4918699f850e4f8cadc2632</id>
<content type='text'>
exportfs currently exits with a non-zero error for some errors,
but not for others.

It does this by having various support routines set the global
variable "export_errno".

Change this to have 'xlog' set export_errno if an ERROR is
reported.  That way all errors will be caught.

Note that the exit error code is changed from 22 (EINVAL)
to the more traditional '1'.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
exportfs currently exits with a non-zero error for some errors,
but not for others.

It does this by having various support routines set the global
variable "export_errno".

Change this to have 'xlog' set export_errno if an ERROR is
reported.  That way all errors will be caught.

Note that the exit error code is changed from 22 (EINVAL)
to the more traditional '1'.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "exportfs: Return non-zero exit value on error"</title>
<updated>2013-10-22T08:32:08+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2013-10-22T08:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=efe3c8d6cb4fc35909a64c0535087676a189fa5f'/>
<id>efe3c8d6cb4fc35909a64c0535087676a189fa5f</id>
<content type='text'>
This reverts commit 956aeff2e24304e938846f81f4b9db34cbf18a32.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 956aeff2e24304e938846f81f4b9db34cbf18a32.
</pre>
</div>
</content>
</entry>
<entry>
<title>exportfs: Return non-zero exit value on error</title>
<updated>2013-10-22T08:28:48+00:00</updated>
<author>
<name>Tony Asleson</name>
<email>tasleson@redhat.com</email>
</author>
<published>2013-10-22T08:28:48+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=956aeff2e24304e938846f81f4b9db34cbf18a32'/>
<id>956aeff2e24304e938846f81f4b9db34cbf18a32</id>
<content type='text'>
To improve error handling when scripting exportfs it's useful
to have non-zero exit codes when the requested operation did not
succeed.

This patch also returns a non-zero exit code if you request to
unexport a non-existant share.

Signed-off-by: Tony Asleson &lt;tasleson@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To improve error handling when scripting exportfs it's useful
to have non-zero exit codes when the requested operation did not
succeed.

This patch also returns a non-zero exit code if you request to
unexport a non-existant share.

Signed-off-by: Tony Asleson &lt;tasleson@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>exportfs: Fix the default authentication flavour setting</title>
<updated>2013-09-24T19:12:01+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2013-09-24T19:12:01+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=7004991526be90ec2647d28c503936dc91bc9100'/>
<id>7004991526be90ec2647d28c503936dc91bc9100</id>
<content type='text'>
Commit 11ba3b1e01b67b7d19f26fba94fabdb60878e809 (Add a default flavor
to an export's e_secinfo list) breaks the ordering of security flavours
in the secinfo list, by reordering 'sec=sys' to always be the first
secinfo flavour if one fails to set a default 'sec' setting.

An export of the form:

/export -sync,no_subtree_check,mp \
           192.168.1.0/24(sec=krb5p:krb5i:krb5,rw,sec=sys,ro)

ends up getting translated by exportfs into the following entry in
/var/lib/nfs/etab:

/export	192.168.1.0/24(ro,sync,wdelay,hide,nocrossmnt,\
                       secure,root_squash,no_all_squash,\
		       no_subtree_check,secure_locks,acl,\
		       mountpoint,anonuid=65534,anongid=65534,\
		       sec=sys,ro,root_squash,no_all_squash,\
		       sec=krb5p:krb5i:krb5,rw,root_squash,no_all_squash)

Note how the 'sec=sys' is now listed first...

The fix is to defer adding the default flavour until the call to
secinfo_show, when we can see if it is even needed at all.
With the patch, the above export is now correctly entered in
/var/lib/nfs/etab as:

/export	192.168.1.0/24(ro,sync,wdelay,hide,nocrossmnt,\
			secure,root_squash,no_all_squash,\
			no_subtree_check,secure_locks,acl,\
			mountpoint,anonuid=65534,anongid=65534,\
			sec=krb5p:krb5i:krb5,rw,root_squash,no_all_squash,\
			sec=sys,ro,root_squash,no_all_squash)

Cc: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 11ba3b1e01b67b7d19f26fba94fabdb60878e809 (Add a default flavor
to an export's e_secinfo list) breaks the ordering of security flavours
in the secinfo list, by reordering 'sec=sys' to always be the first
secinfo flavour if one fails to set a default 'sec' setting.

An export of the form:

/export -sync,no_subtree_check,mp \
           192.168.1.0/24(sec=krb5p:krb5i:krb5,rw,sec=sys,ro)

ends up getting translated by exportfs into the following entry in
/var/lib/nfs/etab:

/export	192.168.1.0/24(ro,sync,wdelay,hide,nocrossmnt,\
                       secure,root_squash,no_all_squash,\
		       no_subtree_check,secure_locks,acl,\
		       mountpoint,anonuid=65534,anongid=65534,\
		       sec=sys,ro,root_squash,no_all_squash,\
		       sec=krb5p:krb5i:krb5,rw,root_squash,no_all_squash)

Note how the 'sec=sys' is now listed first...

The fix is to defer adding the default flavour until the call to
secinfo_show, when we can see if it is even needed at all.
With the patch, the above export is now correctly entered in
/var/lib/nfs/etab as:

/export	192.168.1.0/24(ro,sync,wdelay,hide,nocrossmnt,\
			secure,root_squash,no_all_squash,\
			no_subtree_check,secure_locks,acl,\
			mountpoint,anonuid=65534,anongid=65534,\
			sec=krb5p:krb5i:krb5,rw,root_squash,no_all_squash,\
			sec=sys,ro,root_squash,no_all_squash)

Cc: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
