Re: Bug in server's export -- List of security flavors

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

 



support/nfs/exports.c

505                 if (strcmp(opt, "ro") == 0)
506                         setflags(NFSEXP_READONLY, active, ep);
507                 else if (strcmp(opt, "rw") == 0)
508                         clearflags(NFSEXP_READONLY, active, ep);
...
624                 } else if (strncmp(opt, "sec=", 4) == 0) {
625                         active = parse_flavors(opt+4, ep);

If you find a 'sec=' you go ahead and set it in the e_secinfo array.

But if you encounter a rw or ro before you encounter a 'sec=', you do
not set a flavor in the e_secinfo array.

What we do is if we encounter the 'rw' or 'ro' before the 'sec=', then
it defaults to being a AUTH_SYS flavor. If we encounter it after, then
we know which flavor to set it as.

Of course, we have to account for what happens if we have the following:
share -F nfs -o rw,sec=sys,ro /foo

Because we can't have both a rw and ro export.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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