Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1473241 Details for
Bug 1609128
autofs reload is unable to activate new map entries, it is autofs restart which shows new map entries.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch - fix update_negative_cache() map source usage (update 2)
autofs-5.1.4-fix-update_negative_cache-map-source-usage.patch (text/plain), 2.89 KB, created by
Ian Kent
on 2018-08-04 01:10:08 UTC
(
hide
)
Description:
Patch - fix update_negative_cache() map source usage (update 2)
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2018-08-04 01:10:08 UTC
Size:
2.89 KB
patch
obsolete
>autofs-5.1.4 - fix update_negative_cache() map source usage > >From: Ian Kent <raven@themaw.net> > >File map sources can be either plain text or executable. > >When the map path is specified without a type (eg. when a >full path is used) an instance map source is used and the >original map is left unchanged. > >But update_negative_cache() fails to take this into account >causing it to update the wrong map cache. > >When a map reload is done the map entry appears to not exist >so the new map entry is added. > >This could go unnoticed except that, after a map read, the >map entry cache cleans stale map entries and the existence >of this negative entry causes the new map entry to be deleted >and map lookups continue to fail. > >In hindsite the use of an instance map source for this is >probably uneccessary but changing it will be risky so, for >now, just make update_negative_cache() use the correct map. > >Signed-off-by: Ian Kent <raven@themaw.net> >--- > CHANGELOG | 1 + > daemon/lookup.c | 38 ++++++++++++++++++++++++++++++++++++-- > 2 files changed, 37 insertions(+), 2 deletions(-) > >--- autofs-5.0.7.orig/CHANGELOG >+++ autofs-5.0.7/CHANGELOG >@@ -301,6 +301,7 @@ > - add man page note about extra slashes in paths. > - add units After line to include statd service. > - use systemd sd_notify() at startup. >+- fix update_negative_cache() map source usage. > > 25/07/2012 autofs-5.0.7 > ======================= >--- autofs-5.0.7.orig/daemon/lookup.c >+++ autofs-5.0.7/daemon/lookup.c >@@ -1097,6 +1097,37 @@ static enum nsswitch_status lookup_map_n > return result; > } > >+static struct map_source *lookup_get_map_source(struct master_mapent *entry) >+{ >+ struct map_source *map = entry->maps; >+ struct stat st; >+ char *type; >+ >+ if (map->type || *map->argv[0] != '/') >+ return map; >+ >+ if (*(map->argv[0] + 1) == '/') >+ return map; >+ >+ if (stat(map->argv[0], &st) == -1) >+ return NULL; >+ >+ if (!S_ISREG(st.st_mode)) >+ return NULL; >+ >+ if (st.st_mode & __S_IEXEC) >+ type = "program"; >+ else >+ type = "file"; >+ >+ /* This is a file source with a path starting with "/". >+ * But file maps can be either plain text or executable >+ * so they use a map instance and the actual map source >+ * remains untouched. >+ */ >+ return master_find_source_instance(map, type, map->format, 0, NULL); >+} >+ > static void update_negative_cache(struct autofs_point *ap, struct map_source *source, const char *name) > { > struct master_mapent *entry = ap->entry; >@@ -1130,11 +1161,14 @@ static void update_negative_cache(struct > logmsg("key \"%s\" not found in map source(s).", name); > } > >- /* Doesn't exist in any source, just add it somewhere */ >+ /* Doesn't exist in any source, just add it somewhere. >+ * Also take care to use the same map source used by >+ * map reads and key lookups for the update. >+ */ > if (source) > map = source; > else >- map = entry->maps; >+ map = lookup_get_map_source(entry); > if (map) { > time_t now = time(NULL); > int rv = CHE_FAIL;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1609128
:
1472003
|
1472214
| 1473241