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 309905 Details for
Bug 452202
autofs doesn't parse multi-mount quite right
[?]
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 to check for root-less multi-mount map entry
autofs-4.1.3-correct-multi-check.patch (text/plain), 2.29 KB, created by
Ian Kent
on 2008-06-20 06:29:40 UTC
(
hide
)
Description:
Patch to check for root-less multi-mount map entry
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2008-06-20 06:29:40 UTC
Size:
2.29 KB
patch
obsolete
>--- autofs-4.1.3.orig/modules/parse_sun.c >+++ autofs-4.1.3/modules/parse_sun.c >@@ -283,6 +283,23 @@ const char *skipspace(const char *whence > } > } > >+/* >+ * Check a string to see if a colon appears before the next '/'. >+ */ >+int check_colon(const char *str) >+{ >+ char *ptr = (char *) str; >+ >+ while (*ptr && *ptr != ':' && *ptr != '/') { >+ ptr++; >+ } >+ >+ if (!*ptr || *ptr == '/') >+ return 0; >+ >+ return 1; >+} >+ > /* Get the length of a chunk delimitered by whitespace */ > int chunklen(const char *whence, int expect_colon) > { >@@ -770,6 +787,58 @@ void multi_free_list(struct multi_mnt *l > } > > /* >+ * Scan map entry looking for evidence it has multiple key/mapent >+ * pairs. >+ */ >+static int check_is_multi(const char *mapent) >+{ >+ const char *p = (char *) mapent; >+ int multi = 0; >+ int not_first_chunk = 0; >+ >+ if (!p) { >+ crit("check_is_multi: unexpected NULL map entry pointer"); >+ return 0; >+ } >+ >+ /* If first character is "/" it's a multi-mount */ >+ if (*p == '/') >+ return 1; >+ >+ while (*p) { >+ p = skipspace(p); >+ >+ /* >+ * After the first chunk there can be additional >+ * locations (possibly not multi) or possibly an >+ * options string if the first entry includes the >+ * optional '/' (is multi). Following this any >+ * path that begins with '/' indicates a mutil-mount >+ * entry. >+ */ >+ if (not_first_chunk) { >+ if (*p == '/' || *p == '-') { >+ multi = 1; >+ break; >+ } >+ } >+ >+ while (*p == '-') { >+ p += chunklen(p, 0); >+ p = skipspace(p); >+ } >+ >+ /* >+ * Expect either a path or location >+ * after which it's a multi mount. >+ */ >+ p += chunklen(p, check_colon(p)); >+ not_first_chunk++; >+ } >+ >+ return multi; >+} >+/* > * syntax is: > * [-options] location [location] ... > * [-options] [mountpoint [-options] location [location] ... ]... >@@ -835,7 +904,7 @@ int parse_mount(const char *root, const > q = comment+1; > } > >- if (*p == '/') { >+ if (check_is_multi(p)) { > struct multi_mnt *list, *head = NULL, *next; > char *multi_root, *pstrip; > int l; >@@ -863,7 +932,12 @@ int parse_mount(const char *root, const > return 1; > } > >- path = dequote(p, l = chunklen(p, 0)); >+ if (*p != '/') { >+ l = 0; >+ path = dequote("/", 1); >+ } else >+ path = dequote(p, l = chunklen(p, 0)); >+ > if (!path) { > error(MODPREFIX "out of memory"); > free(myoptions);
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 452202
:
309903
| 309905