{
memcpy(new_ctx, ctx, sizeof(*ctx));
new_ctx->prepath = NULL;
- new_ctx->mount_options = NULL;
new_ctx->nodename = NULL;
new_ctx->username = NULL;
new_ctx->password = NULL;
* Make sure to stay in sync with smb3_cleanup_fs_context_contents()
*/
DUP_CTX_STR(prepath);
- DUP_CTX_STR(mount_options);
DUP_CTX_STR(username);
DUP_CTX_STR(password);
DUP_CTX_STR(server_hostname);
static int smb3_fs_context_parse_monolithic(struct fs_context *fc,
void *data)
{
- struct smb3_fs_context *ctx = smb3_fc2context(fc);
char *options = data, *key;
int ret = 0;
if (!options)
return 0;
- ctx->mount_options = kstrdup(data, GFP_KERNEL);
- if (ctx->mount_options == NULL)
- return -ENOMEM;
-
ret = security_sb_eat_lsm_opts(options, &fc->security);
if (ret)
return ret;
/*
* Make sure this stays in sync with smb3_fs_context_dup()
*/
- kfree(ctx->mount_options);
- ctx->mount_options = NULL;
kfree(ctx->username);
ctx->username = NULL;
kfree_sensitive(ctx->password);
__u16 compression; /* compression algorithm 0xFFFF default 0=disabled */
bool rootfs:1; /* if it's a SMB root file system */
bool witness:1; /* use witness protocol */
-
- char *mount_options;
};
extern const struct fs_parameter_spec smb3_fs_parameters[];