NFSD export parsing issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

while experimenting with various modifications in mountd to deal better with crossmounts
I noticed a problem in fs/nfsd/export.c svc_export_parse(), it always ignores the uuid
as provided by my mountd.

If CONFIG_NFSD_V4 is not enabled, both fsloc_parse() and secinfo_parse() are a no-op.
This causes the while loop to terminate prematurely because only the keywords "fsloc" or "secinfo"
got consumed, their parameters are still in the buffer and will trigger the break.

while ((len = qword_get(&mesg, buf, PAGE_SIZE)) > 0) {
        if (strcmp(buf, "fsloc") == 0)
                err = fsloc_parse(&mesg, buf, &exp.ex_fslocs);
        else if (strcmp(buf, "uuid") == 0)
                err = nfsd_uuid_parse(&mesg, buf, &exp.ex_uuid);
        else if (strcmp(buf, "secinfo") == 0)
                err = secinfo_parse(&mesg, buf, &exp);
        else    
                /* quietly ignore unknown words and anything
                 * following. Newer user-space can try to set
                 * new values, then see what the result was.
                 */
                break;  
        if (err)
                goto out4;
}

nfs-utils mountd always places fslock and secinfo before the uuid, no mather
whether I use NFSv4 or v3.

So I'm not sure where to address the problem. Should we fix mountd or
change both fsloc_parse() and secinfo_parse() to consume all their
data even in the !CONFIG_NFSD_V4 case?

Thanks,
//richard



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux