2.23.2-3: #950497
This commit is contained in:
		
							parent
							
								
									2cfecf3529
								
							
						
					
					
						commit
						49ff57a01e
					
				
							
								
								
									
										39
									
								
								2.24-libmount-canonicalize-for-conversion-from-loopdev.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								2.24-libmount-canonicalize-for-conversion-from-loopdev.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,39 @@ | |||||||
|  | From 3f420a49dd4d0c413b635dd621aa34eebce2d3d2 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Karel Zak <kzak@redhat.com> | ||||||
|  | Date: Mon, 5 Aug 2013 13:58:01 +0200 | ||||||
|  | Subject: [PATCH] libmount: canonicalize for conversion from loopdev backing | ||||||
|  |  file | ||||||
|  | 
 | ||||||
|  |   # mount foo.img /mnt | ||||||
|  |   # umount foo.img | ||||||
|  |   umount: foo.img: not mounted | ||||||
|  | 
 | ||||||
|  | The loopdev code (and sysfs backing_file) uses absolute paths, but | ||||||
|  | libmount does not canonicalize the path before lookup for the backing file. | ||||||
|  | 
 | ||||||
|  | References: https://bugzilla.redhat.com/show_bug.cgi?id=950497 | ||||||
|  | Signed-off-by: Karel Zak <kzak@redhat.com> | ||||||
|  | ---
 | ||||||
|  |  libmount/src/context_umount.c | 7 ++++++- | ||||||
|  |  1 file changed, 6 insertions(+), 1 deletion(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c
 | ||||||
|  | index 2b791c4..b02902c 100644
 | ||||||
|  | --- a/libmount/src/context_umount.c
 | ||||||
|  | +++ b/libmount/src/context_umount.c
 | ||||||
|  | @@ -161,7 +161,12 @@ try_loopdev:
 | ||||||
|  | 		struct stat st; | ||||||
|  | 
 | ||||||
|  | 		if (stat(tgt, &st) == 0 && S_ISREG(st.st_mode)) { | ||||||
|  | -			int count = loopdev_count_by_backing_file(tgt, &loopdev);
 | ||||||
|  | +			int count;
 | ||||||
|  | +
 | ||||||
|  | +			cn_tgt = mnt_resolve_path(tgt, cache);
 | ||||||
|  | +			count = loopdev_count_by_backing_file(cn_tgt, &loopdev);
 | ||||||
|  | +			if (!cache)
 | ||||||
|  | +				free(cn_tgt);
 | ||||||
|  | 			if (count == 1) { | ||||||
|  | 				DBG(CXT, mnt_debug_h(cxt, | ||||||
|  | 					"umount: %s --> %s (retry)", tgt, loopdev)); | ||||||
|  | --
 | ||||||
|  | 1.8.1.4 | ||||||
| @ -81,6 +81,8 @@ Patch0: 2.23-login-lastlog-create.patch | |||||||
| Patch1: 2.24-agetty-clocal.patch | Patch1: 2.24-agetty-clocal.patch | ||||||
| # v2.24 backport: #987787 - Remove lastlogin from su | # v2.24 backport: #987787 - Remove lastlogin from su | ||||||
| Patch2: 2.24-su-suppress-PAM-info-messages.patch | Patch2: 2.24-su-suppress-PAM-info-messages.patch | ||||||
|  | # v2.24 backport: #950497 - problem umounting loop device | ||||||
|  | Patch3: 2.24-libmount-canonicalize-for-conversion-from-loopdev.patch | ||||||
| 
 | 
 | ||||||
| %description | %description | ||||||
| The util-linux package contains a large variety of low-level system | The util-linux package contains a large variety of low-level system | ||||||
| @ -800,6 +802,7 @@ fi | |||||||
| * Mon Sep  9 2013 Karel Zak <kzak@redhat.com> 2.23.2-3 | * Mon Sep  9 2013 Karel Zak <kzak@redhat.com> 2.23.2-3 | ||||||
| - refresh and rename patches | - refresh and rename patches | ||||||
| - fix #987787 - Remove lastlogin from su | - fix #987787 - Remove lastlogin from su | ||||||
|  | - fix #950497 - problem umounting loop device | ||||||
| 
 | 
 | ||||||
| * Thu Aug  1 2013 Karel Zak <kzak@redhat.com> 2.23.2-2 | * Thu Aug  1 2013 Karel Zak <kzak@redhat.com> 2.23.2-2 | ||||||
| - fix 990083 - su doesn't work with pam_ecryptfs | - fix 990083 - su doesn't work with pam_ecryptfs | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user