45 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| autofs-5.1.8 - fix multi-mount check
 | |
| 
 | |
| From: Ian Kent <raven@themaw.net>
 | |
| 
 | |
| When checking if a mount location is a multi-mount after the first location
 | |
| the next '-' or '/' indicates it's a multi-mount.
 | |
| 
 | |
| But the '-' can be part of a mount location and can follow a space leading
 | |
| to incorrectly deciding the location is a multi-mount.
 | |
| 
 | |
| Signed-off-by: Ian Kent <raven@themaw.net>
 | |
| ---
 | |
|  CHANGELOG           |    1 +
 | |
|  modules/parse_sun.c |    9 ++++++++-
 | |
|  2 files changed, 9 insertions(+), 1 deletion(-)
 | |
| 
 | |
| --- autofs-5.1.4.orig/CHANGELOG
 | |
| +++ autofs-5.1.4/CHANGELOG
 | |
| @@ -151,6 +151,7 @@
 | |
|  - fix incorrect matching of cached wildcard key.
 | |
|  - fix expire retry looping.
 | |
|  - allow -null map in indirect maps.
 | |
| +- fix multi-mount check.
 | |
|  
 | |
|  xx/xx/2018 autofs-5.1.5
 | |
|  - fix flag file permission.
 | |
| --- autofs-5.1.4.orig/modules/parse_sun.c
 | |
| +++ autofs-5.1.4/modules/parse_sun.c
 | |
| @@ -786,7 +786,14 @@ static int check_is_multi(const char *ma
 | |
|  		if (not_first_chunk) {
 | |
|  			if (*p == '"')
 | |
|  				p++;
 | |
| -			if (*p == '/' || *p == '-') {
 | |
| +			/*
 | |
| +			 * Although an options string here would mean
 | |
| +			 * we have a multi-mount we can't rely on it
 | |
| +			 * since it's also valid in a mount location.
 | |
| +			 */
 | |
| +			if (*p == '-')
 | |
| +				p++;
 | |
| +			if (*p == '/') {
 | |
|  				multi = 1;
 | |
|  				break;
 | |
|  			}
 |