diff --git a/external/ntfs-3g/include/ntfs-3g/endians.h b/external/ntfs-3g/include/ntfs-3g/endians.h index 397f1c20b9..f00089372b 100755 --- a/external/ntfs-3g/include/ntfs-3g/endians.h +++ b/external/ntfs-3g/include/ntfs-3g/endians.h @@ -52,6 +52,8 @@ #include #endif +#define __BYTE_ORDER BYTE_ORDER + #ifndef __BYTE_ORDER # if defined(_BYTE_ORDER) # define __BYTE_ORDER _BYTE_ORDER diff --git a/external/ntfs-3g/libfuse-lite/fusermount.c b/external/ntfs-3g/libfuse-lite/fusermount.c index 4e724dbc3b..c94d5838be 100755 --- a/external/ntfs-3g/libfuse-lite/fusermount.c +++ b/external/ntfs-3g/libfuse-lite/fusermount.c @@ -422,6 +422,11 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode, else strcpy(source, dev); + char * rchr = strchr(source, '@'); + if (rchr) { + rchr[0] = ','; + } + if (restore_privs()) goto err; diff --git a/external/ntfs-3g/src/ntfs-3g_common.c b/external/ntfs-3g/src/ntfs-3g_common.c index 38ccd74274..d6e2942d8b 100755 --- a/external/ntfs-3g/src/ntfs-3g_common.c +++ b/external/ntfs-3g/src/ntfs-3g_common.c @@ -225,6 +225,7 @@ char *parse_mount_options(ntfs_fuse_context_t *ctx, const struct ntfs_options *popts, BOOL low_fuse) { char *options, *s, *opt, *val, *ret = NULL; + char *sz_device = NULL; const char *orig_opts = popts->options; BOOL no_def_opts = FALSE; int default_permissions = 0; @@ -523,7 +524,14 @@ char *parse_mount_options(ntfs_fuse_context_t *ctx, if (ntfs_strappend(&ret, "fsname=")) goto err_exit; - if (ntfs_strappend(&ret, popts->device)) + sz_device = malloc(strlen(popts->device) + 1); + if (!sz_device) + goto err_exit; + strcpy(sz_device, popts->device); + char *r_device = strchr(sz_device, ','); + if (r_device) + r_device[0] = '@'; + if (ntfs_strappend(&ret, sz_device)) goto err_exit; if (permissions && !acl) ctx->secure_flags |= (1 << SECURITY_DEFAULT); @@ -536,6 +544,8 @@ char *parse_mount_options(ntfs_fuse_context_t *ctx, ctx->hiberfile = FALSE; } exit: + if (sz_device) + free(sz_device); free(options); return ret; err_exit: