Merge 9d1211f13b into 75dcdc2cf3
				
					
				
			
						commit
						1c0b6af375
					
				|  | @ -4787,6 +4787,16 @@ int main(int argc, char *argv[]) | |||
| #endif /* POSIXACLS */ | ||||
| 		ctx->dmask = ctx->fmask = 0; | ||||
| 	} else { | ||||
| 		/*
 | ||||
| 		 * User mapping path was defined, but building it failed | ||||
| 		 * Warn the user and halt the mounting | ||||
| 		 */ | ||||
| 		if (ctx->usermap_path) { | ||||
| 			ntfs_log_perror("Failed to load user mapping '%s'", | ||||
| 					ctx->usermap_path); | ||||
| 			err = NTFS_VOLUME_SYNTAX_ERROR; | ||||
| 			goto err_out; | ||||
| 		} | ||||
| 		ctx->security.uid = ctx->uid; | ||||
| 		ctx->security.gid = ctx->gid; | ||||
| 		/* same ownership/permissions for all files */ | ||||
|  | @ -4808,8 +4818,6 @@ int main(int argc, char *argv[]) | |||
| 			permissions_mode = "Ownership and permissions disabled"; | ||||
| 		} | ||||
| 	} | ||||
| 	if (ctx->usermap_path) | ||||
| 		free (ctx->usermap_path); | ||||
| 
 | ||||
| #if defined(HAVE_SETXATTR) && defined(XATTR_MAPPINGS) | ||||
| 	xattr_mapping = ntfs_xattr_build_mapping(ctx->vol, | ||||
|  | @ -4855,6 +4863,8 @@ int main(int argc, char *argv[]) | |||
| 	fuse_session_destroy(se); | ||||
| err_out: | ||||
| 	ntfs_mount_error(opts.device, opts.mnt_point, err); | ||||
| 	if (ctx->usermap_path) | ||||
| 		free(ctx->usermap_path); | ||||
| 	if (ctx->abs_mnt_point) | ||||
| 		free(ctx->abs_mnt_point); | ||||
| #if defined(HAVE_SETXATTR) && defined(XATTR_MAPPINGS) | ||||
|  |  | |||
|  | @ -4514,6 +4514,16 @@ int main(int argc, char *argv[]) | |||
| #endif /* POSIXACLS */ | ||||
| 		ctx->dmask = ctx->fmask = 0; | ||||
| 	} else { | ||||
| 		/*
 | ||||
| 		 * User mapping path was defined, but building it failed | ||||
| 		 * Warn the user and halt the mounting | ||||
| 		 */ | ||||
| 		if (ctx->usermap_path) { | ||||
| 			ntfs_log_perror("Failed to load user mapping '%s'", | ||||
| 					ctx->usermap_path); | ||||
| 			err = NTFS_VOLUME_SYNTAX_ERROR; | ||||
| 			goto err_out; | ||||
| 		} | ||||
| 		ctx->security.uid = ctx->uid; | ||||
| 		ctx->security.gid = ctx->gid; | ||||
| 		/* same ownership/permissions for all files */ | ||||
|  | @ -4535,8 +4545,6 @@ int main(int argc, char *argv[]) | |||
| 			permissions_mode = "Ownership and permissions disabled"; | ||||
| 		} | ||||
| 	} | ||||
| 	if (ctx->usermap_path) | ||||
| 		free (ctx->usermap_path); | ||||
| 
 | ||||
| #if defined(HAVE_SETXATTR) && defined(XATTR_MAPPINGS) | ||||
| 	xattr_mapping = ntfs_xattr_build_mapping(ctx->vol, | ||||
|  | @ -4584,6 +4592,8 @@ int main(int argc, char *argv[]) | |||
| 	fuse_destroy(fh); | ||||
| err_out: | ||||
| 	ntfs_mount_error(opts.device, opts.mnt_point, err); | ||||
| 	if (ctx->usermap_path) | ||||
| 		free(ctx->usermap_path); | ||||
| 	if (ctx->abs_mnt_point) | ||||
| 		free(ctx->abs_mnt_point); | ||||
| #if defined(HAVE_SETXATTR) && defined(XATTR_MAPPINGS) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue