Re: [PATCH 08/13] NFS: Add functions to parse nfs mount options to fs/nfs/super.c

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

 



On Mon, May 21, 2007 at 12:09:54PM -0400, Chuck Lever wrote:
> For NFSv2 and NFSv3 mount options.
> Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>

 ....

> +static int nfs_parse_options(char *raw, struct nfs_mount_args *mnt)
> +{
> +	char *p, *string;
> +
> +	if (!raw) {
> +		dprintk("NFS: mount options string was NULL.\n");
> +		return 1;
> +	}
> +
> +	while ((p = strsep (&raw, ",")) != NULL) {
> +		substring_t args[MAX_OPT_ARGS];
> +		int option, token;
> +
> +		if (!*p)
> +			continue;
> +		token = match_token(p, nfs_tokens, args);

 ....

> +
> +		case Opt_context:
> +			match_strcpy(mnt->nmd.context, args);
> +			break;

 The userspace version (nfs-utils) of this code supports a quoted
 context strings. For example:

    context="aaa,bbb,ccc",hard

 It seems your code blindly parses a raw option string by ",".

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux