- add fix for bug 2216877.
This commit is contained in:
		
							parent
							
								
									0ff3152c4c
								
							
						
					
					
						commit
						c75ed87667
					
				| @ -0,0 +1,46 @@ | ||||
| autofs-5.1.8 - fix incorrect matching of cached wildcard key | ||||
| 
 | ||||
| From: Ian Kent <raven@themaw.net> | ||||
| 
 | ||||
| During the implementation of amd format map entry support the code | ||||
| to match a cached key was modified. | ||||
| 
 | ||||
| Unfortunately there's a case were the key lookup behaves incorrectly. | ||||
| 
 | ||||
| That case is when there are included maps in the map itself and one | ||||
| of the maps (usually the last) has a wildcard key entry. In this case | ||||
| the wildcard key may be found during lookup but the map it blongs to | ||||
| isn't checked so it can be incorrectly returned instead of a matching | ||||
| entry in a subsequent included map. | ||||
| 
 | ||||
| Signed-off-by: Ian Kent <raven@themaw.net> | ||||
| ---
 | ||||
|  CHANGELOG        |    1 + | ||||
|  lib/parse_subs.c |    5 ++++- | ||||
|  2 files changed, 5 insertions(+), 1 deletion(-) | ||||
| 
 | ||||
| --- autofs-5.1.4.orig/CHANGELOG
 | ||||
| +++ autofs-5.1.4/CHANGELOG
 | ||||
| @@ -148,6 +148,7 @@
 | ||||
|  - add ioctlfd open helper. | ||||
|  - make open files limit configurable. | ||||
|  - fix some sss error return cases. | ||||
| +- fix incorrect matching of cached wildcard key.
 | ||||
|   | ||||
|  xx/xx/2018 autofs-5.1.5 | ||||
|  - fix flag file permission. | ||||
| --- autofs-5.1.4.orig/lib/parse_subs.c
 | ||||
| +++ autofs-5.1.4/lib/parse_subs.c
 | ||||
| @@ -532,8 +532,11 @@ struct mapent *match_cached_key(struct a
 | ||||
|  			while ((me = cache_lookup_key_next(me))) | ||||
|  				if (me->source == source) | ||||
|  					break; | ||||
| -			if (!me)
 | ||||
| +			if (!me) {
 | ||||
|  				me = cache_lookup_distinct(mc, "*"); | ||||
| +				if (me != source)
 | ||||
| +					goto done;
 | ||||
| +			}
 | ||||
|  		} | ||||
|   | ||||
|  		if (!me) | ||||
							
								
								
									
										10
									
								
								autofs.spec
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								autofs.spec
									
									
									
									
									
								
							| @ -8,7 +8,7 @@ | ||||
| Summary: A tool for automatically mounting and unmounting filesystems | ||||
| Name: autofs | ||||
| Version: 5.1.4 | ||||
| Release: 106%{?dist} | ||||
| Release: 107%{?dist} | ||||
| Epoch: 1 | ||||
| License: GPLv2+ | ||||
| Group: System Environment/Daemons | ||||
| @ -323,6 +323,7 @@ Patch321: autofs-5.1.8-add-soucre-parameter-to-module-functions.patch | ||||
| Patch322: autofs-5.1.8-add-ioctlfd-open-helper.patch | ||||
| Patch323: autofs-5.1.8-make-open-files-limit-configurable.patch | ||||
| Patch324: autofs-5.1.8-fix-some-sss-error-return-cases.patch | ||||
| Patch325: autofs-5.1.8-fix-incorrect-matching-of-cached-wildcard-key.patch | ||||
| 
 | ||||
| %if %{with_systemd} | ||||
| BuildRequires: systemd-units | ||||
| @ -687,6 +688,7 @@ echo %{version}-%{release} > .version | ||||
| %patch322 -p1 | ||||
| %patch323 -p1 | ||||
| %patch324 -p1 | ||||
| %patch325 -p1 | ||||
| 
 | ||||
| %build | ||||
| LDFLAGS=-Wl,-z,now | ||||
| @ -782,6 +784,12 @@ fi | ||||
| %dir /etc/auto.master.d | ||||
| 
 | ||||
| %changelog | ||||
| * Wed Jul 05 2023 Ian Kent <ikent@redhat.com> - 5.1.4-107 | ||||
| - bz2216877 - When looking up included maps, sometimes autofs does not | ||||
|   consult all the included files in order | ||||
|   - fix incorrect matching of cached wildcard key | ||||
| - Resolves: rhbz#2216877 | ||||
| 
 | ||||
| * Fri Jun 16 2023 Ian Kent <ikent@redhat.com> - 5.1.4-106 | ||||
| - bz2214444 - The sss lookup modules handles error return incorrectly | ||||
|   in some cases | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user