[RFC] Domain of Interpretation mapping daemon

Neil Brown neilb at suse.de
Sun Dec 2 19:19:12 EST 2007


On Friday November 30, dpquigl at tycho.nsa.gov wrote:
> 
> It seems odd but there are several entries in the localtoglobal cache
> that are the same. I have pasted the output below. It seems odd to me
> that the same label is in there several times with the only difference
> being the expiry time. Being a cache I'd assume it would use the
> existing entry until expiry time so there must be something wrong with
> my code. This is a smaller list than I originally had since some of the
> entries expired. The first time I tried this there were some entries
> with a ref count of 2.
> 
> [root at moss-saturn nfs4.localtoglobal]# echo 0
> > /proc/sys/sunrpc/rpc_debug
> [root at moss-saturn nfs4.localtoglobal]# cat content 
> local [global]
> unconfined_u:object_r:default_t:s0 0s:t_tluafed:r_tcejbo:u_denifnocnu
> unconfined_u:object_r:default_t:s0 0s:t_tluafed:r_tcejbo:u_denifnocnu
> unconfined_u:object_r:default_t:s0 0s:t_tluafed:r_tcejbo:u_denifnocnu
....

Your _match function is wrong.

It should return 'true' (non-zero) if there is a match, and 'false'
(zero) if the two are different.
But you are returning the result of strcmp, which is exactly the
reverse of this.
Use
   strcmp(...) == 0

and it should work.

NeilBrown


More information about the NFSv4 mailing list