2013-05-22 09:58:28

by Mkrtchyan, Tigran

[permalink] [raw]
Subject: expected unxpected behavior



Hi,

we hit some strange behavior which is expected from one side, but unexpected at the same time.
We run our nfs server with v3 and v4. Due to misconfiguration in idmapping, we got some files
to be owned by uid -1. Which is ok, as with v4 server returns nobody. Nevertheless, this
prevent to list the directory with v3. This is the result of uid_valid()/gid_valid() calls
in nfs3xdr.c:decode_fattr3. The uid_valid/gid_valid checks that provided uid/gid are not -1.
Probably this is ok. My confusion is: a) one file with bad uid/gid prevents listing of a
directory, b) in nfs v3 spec uid3 (as well as uid_t in linux) is unsigned int 32 and
value 0xffffffff is absolutely valid.


Tigran.



2013-05-22 13:56:38

by Myklebust, Trond

[permalink] [raw]
Subject: RE: expected unxpected behavior

PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBsaW51eC1uZnMtb3duZXJAdmdl
ci5rZXJuZWwub3JnIFttYWlsdG86bGludXgtbmZzLQ0KPiBvd25lckB2Z2VyLmtlcm5lbC5vcmdd
IE9uIEJlaGFsZiBPZiBNa3J0Y2h5YW4sIFRpZ3Jhbg0KPiBTZW50OiBXZWRuZXNkYXksIE1heSAy
MiwgMjAxMyA1OjU4IEFNDQo+IFRvOiBsaW51eC1uZnNAdmdlci5rZXJuZWwub3JnDQo+IFN1Ympl
Y3Q6IGV4cGVjdGVkIHVueHBlY3RlZCBiZWhhdmlvcg0KPiANCj4gDQo+IA0KPiBIaSwNCj4gDQo+
IHdlIGhpdCBzb21lIHN0cmFuZ2UgYmVoYXZpb3Igd2hpY2ggaXMgZXhwZWN0ZWQgZnJvbSBvbmUg
c2lkZSwgYnV0DQo+IHVuZXhwZWN0ZWQgYXQgdGhlIHNhbWUgdGltZS4NCj4gV2UgcnVuIG91ciBu
ZnMgc2VydmVyIHdpdGggdjMgYW5kIHY0LiBEdWUgdG8gbWlzY29uZmlndXJhdGlvbiBpbiBpZG1h
cHBpbmcsDQo+IHdlIGdvdCBzb21lIGZpbG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