2016-06-25 20:12:10

by Trond Myklebust

[permalink] [raw]
Subject: /etc/exports parsing is borked again in nfs-utils

W3Jvb3RAbGVpcmEgbmZzXSMgY2F0IC9ldGMvZXhwb3J0cw0KL2V4cG9ydAkJLXJvLHNlYz1zeXMs
c3luYwlsb2NhbGhvc3Qocncsbm9fcm9vdF9zcXUNCmFzaCkNCltyb290QGxlaXJhIG5mc10jIGV4
cG9ydGZzIC1ydg0KZXhwb3J0aW5nIGxvY2FsaG9zdDovZXhwb3J0DQpbcm9vdEBsZWlyYSBuZnNd
IyBtb3VudCAtdCBuZnMgbG9jYWxob3N0Oi9leHBvcnQgL21udC9uZnMNCltyb290QGxlaXJhIG5m
c10jIG1rZGlyIC9tbnQvbmZzL2dudXJyDQpta2RpcjogY2Fubm90IGNyZWF0ZSBkaXJlY3Rvcnkg
4oCYL21udC9uZnMvZ251cnLigJk6IFJlYWQtb25seSBmaWxlIHN5c3RlbQ0KDQoNCk5vdGUgdGhh
dCByZW1vdmluZyB0aGUgInNlYz1zeXMiIGFib3ZlIGNhdXNlcyB0aGUgdGVzdCB0byBzdWNjZWVk
Lg0KDQotLSANCg0KVHJvbmQgTXlrbGVidXN0DQpMaW51eCBORlMgY2xpZW50IG1haW50YWluZXIs
IFByaW1hcnlEYXRhDQp0cm9uZC5teWtsZWJ1c3RAcHJpbWFyeWRhdGEuY29tDQo=



2016-06-30 15:43:34

by Steve Dickson

[permalink] [raw]
Subject: Re: /etc/exports parsing is borked again in nfs-utils



On 06/25/2016 04:12 PM, Trond Myklebust wrote:
> [root@leira nfs]# cat /etc/exports
> /export -ro,sec=sys,sync localhost(rw,no_root_squ
> ash)
> [root@leira nfs]# exportfs -rv
> exporting localhost:/export
> [root@leira nfs]# mount -t nfs localhost:/export /mnt/nfs
> [root@leira nfs]# mkdir /mnt/nfs/gnurr
> mkdir: cannot create directory ?/mnt/nfs/gnurr?: Read-only file system
>
>
> Note that removing the "sec=sys" above causes the test to succeed.
When you say "succeed" what do you mean by that since your
are specifying both 'ro' and 'rw'.

steved.

2016-06-30 16:00:36

by Trond Myklebust

[permalink] [raw]
Subject: Re: /etc/exports parsing is borked again in nfs-utils


> On Jun 30, 2016, at 11:42, Steve Dickson <[email protected]> wrote:
>
>
>
> On 06/25/2016 04:12 PM, Trond Myklebust wrote:
>> [root@leira nfs]# cat /etc/exports
>> /export -ro,sec=sys,sync localhost(rw,no_root_squ
>> ash)
>> [root@leira nfs]# exportfs -rv
>> exporting localhost:/export
>> [root@leira nfs]# mount -t nfs localhost:/export /mnt/nfs
>> [root@leira nfs]# mkdir /mnt/nfs/gnurr
>> mkdir: cannot create directory ?/mnt/nfs/gnurr?: Read-only file system
>>
>>
>> Note that removing the "sec=sys" above causes the test to succeed.
> When you say "succeed" what do you mean by that since your
> are specifying both 'ro' and 'rw?.

I expect the default option specification (i.e. ?ro?) to be overridden by the host-specific option. That?s how it used to work, and I know, because I had to fix it once already.

Cheers
Trond


2016-07-05 18:45:59

by Steve Dickson

[permalink] [raw]
Subject: Re: /etc/exports parsing is borked again in nfs-utils



On 06/25/2016 04:12 PM, Trond Myklebust wrote:
> [root@leira nfs]# cat /etc/exports
> /export -ro,sec=sys,sync localhost(rw,no_root_squ
> ash)
> [root@leira nfs]# exportfs -rv
> exporting localhost:/export
> [root@leira nfs]# mount -t nfs localhost:/export /mnt/nfs
> [root@leira nfs]# mkdir /mnt/nfs/gnurr
> mkdir: cannot create directory ‘/mnt/nfs/gnurr’: Read-only file system
>
>
> Note that removing the "sec=sys" above causes the test to succeed.
>
Well it has something to do with

commit 9b5c3c6a6571a265a90cfce30345891fac24a67c
Author: Trond Myklebust <[email protected]>
Date: Wed Sep 18 11:50:58 2013 -0400

exportfs: insecure/secure should be a secinfo_flag

Because I commit out the call to secinfo_flags_show(),
the export is exported correctly... still looking...

steved.

2016-07-05 19:06:32

by Steve Dickson

[permalink] [raw]
Subject: Re: /etc/exports parsing is borked again in nfs-utils



On 07/05/2016 02:45 PM, Steve Dickson wrote:
>
>
> On 06/25/2016 04:12 PM, Trond Myklebust wrote:
>> [root@leira nfs]# cat /etc/exports
>> /export -ro,sec=sys,sync localhost(rw,no_root_squ
>> ash)
>> [root@leira nfs]# exportfs -rv
>> exporting localhost:/export
>> [root@leira nfs]# mount -t nfs localhost:/export /mnt/nfs
>> [root@leira nfs]# mkdir /mnt/nfs/gnurr
>> mkdir: cannot create directory ‘/mnt/nfs/gnurr’: Read-only file system
>>
>>
>> Note that removing the "sec=sys" above causes the test to succeed.
>>
> Well it has something to do with
>
> commit 9b5c3c6a6571a265a90cfce30345891fac24a67c
> Author: Trond Myklebust <[email protected]>
> Date: Wed Sep 18 11:50:58 2013 -0400
>
> exportfs: insecure/secure should be a secinfo_flag
>
> Because I commit out the call to secinfo_flags_show(),
> the export is exported correctly... still looking...
It turns out the problem has nothing to do that commit
because the export flags that are being passed to it
are wrong.

When the sec= specified in the default options the
flags stored in the e_secinfo are the default
export flags and are not being updated by the
host-specific options.

I'm not sure how this ever worked... :-(

steved.