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 610129 Details for
Bug 846870
RFE: timeout option cannot be configured individually with multiple direct 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 - add nobind option (dependent patch).
autofs-5.0.5-add-nobind-option.patch (text/plain), 8.66 KB, created by
Ian Kent
on 2012-09-06 00:55:01 UTC
(
hide
)
Description:
Patch - add nobind option (dependent patch).
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2012-09-06 00:55:01 UTC
Size:
8.66 KB
patch
obsolete
>autofs-5.0.5 - add nobind option > >From: Lars R. Damerow <lars@pixar.com> > >If we want to prevent the use of bind mounting for local mounts >the option "nosymlink" has to be used or we need to specify the >"port=<port number>" optionn the mount location. > >To resolve this the "nobind" option is added. >The man page documentation for the "nosymlink" option is replaced >with the documentation for this option but the handling of the >"nosymlink" option has been retained for backward compatibity. >--- > > CHANGELOG | 1 + > daemon/automount.c | 3 +++ > include/automount.h | 3 +++ > include/master.h | 2 +- > lib/master.c | 8 ++++++-- > lib/master_parse.y | 8 ++++++-- > lib/master_tok.l | 1 + > man/auto.master.5.in | 12 ++++++------ > modules/mount_autofs.c | 8 ++++++-- > modules/mount_nfs.c | 9 ++++++--- > 10 files changed, 39 insertions(+), 16 deletions(-) > > >--- autofs-5.0.5.orig/CHANGELOG >+++ autofs-5.0.5/CHANGELOG >@@ -95,6 +95,7 @@ > - fix sss wildcard match. > - fix dlopen() error handling in sss module. > - fix configure string length tests for sss library. >+- add nobind option. > > 03/09/2009 autofs-5.0.5 > ----------------------- >--- autofs-5.0.5.orig/daemon/automount.c >+++ autofs-5.0.5/daemon/automount.c >@@ -1573,6 +1573,9 @@ void *handle_mounts(void *arg) > > free(root); > >+ if (ap->flags & MOUNT_FLAG_NOBIND) >+ info(ap->logopt, "bind mounts disabled"); >+ > if (ap->flags & MOUNT_FLAG_GHOST && ap->type != LKP_DIRECT) > info(ap->logopt, "ghosting enabled"); > >--- autofs-5.0.5.orig/include/automount.h >+++ autofs-5.0.5/include/automount.h >@@ -405,6 +405,9 @@ struct kernel_mod_version { > /* Use server weight only for selection */ > #define MOUNT_FLAG_USE_WEIGHT_ONLY 0x0010 > >+/* Don't use bind mounts even when system supports them */ >+#define MOUNT_FLAG_NOBIND 0x0020 >+ > struct autofs_point { > pthread_t thid; > char *path; /* Mount point name */ >--- autofs-5.0.5.orig/include/master.h >+++ autofs-5.0.5/include/master.h >@@ -77,7 +77,7 @@ void master_mutex_unlock(void); > void master_mutex_lock_cleanup(void *); > void master_set_default_timeout(void); > void master_set_default_ghost_mode(void); >-int master_add_autofs_point(struct master_mapent *, time_t, unsigned, unsigned, int); >+int master_add_autofs_point(struct master_mapent *, time_t, unsigned, unsigned, unsigned, int); > void master_free_autofs_point(struct autofs_point *); > struct map_source * > master_add_map_source(struct master_mapent *, char *, char *, time_t, int, const char **); >--- autofs-5.0.5.orig/lib/master.c >+++ autofs-5.0.5/lib/master.c >@@ -65,8 +65,9 @@ void master_mutex_lock_cleanup(void *arg > return; > } > >-int master_add_autofs_point(struct master_mapent *entry, >- time_t timeout, unsigned logopt, unsigned ghost, int submount) >+int master_add_autofs_point(struct master_mapent *entry, time_t timeout, >+ unsigned logopt, unsigned nobind, unsigned ghost, >+ int submount) > { > struct autofs_point *ap; > int status; >@@ -104,6 +105,9 @@ int master_add_autofs_point(struct maste > if (ghost) > ap->flags = MOUNT_FLAG_GHOST; > >+ if (nobind) >+ ap->flags |= MOUNT_FLAG_NOBIND; >+ > if (ap->path[1] == '-') > ap->type = LKP_DIRECT; > else >--- autofs-5.0.5.orig/lib/master_parse.y >+++ autofs-5.0.5/lib/master_parse.y >@@ -57,6 +57,7 @@ static char *type; > static char *format; > static long timeout; > static long negative_timeout; >+static unsigned nobind; > static unsigned ghost; > extern unsigned global_selection_options; > static unsigned random_selection; >@@ -98,7 +99,7 @@ static int master_fprintf(FILE *, char * > > %token COMMENT > %token MAP >-%token OPT_TIMEOUT OPT_NTIMEOUT OPT_NOGHOST OPT_GHOST OPT_VERBOSE >+%token OPT_TIMEOUT OPT_NTIMEOUT OPT_NOBIND OPT_NOGHOST OPT_GHOST OPT_VERBOSE > %token OPT_DEBUG OPT_RANDOM OPT_USE_WEIGHT > %token COLON COMMA NL DDASH > %type <strtype> map >@@ -185,6 +186,7 @@ line: > | PATH OPT_USE_WEIGHT { master_notify($1); YYABORT; } > | PATH OPT_DEBUG { master_notify($1); YYABORT; } > | PATH OPT_TIMEOUT { master_notify($1); YYABORT; } >+ | PATH OPT_NOBIND { master_notify($1); YYABORT; } > | PATH OPT_GHOST { master_notify($1); YYABORT; } > | PATH OPT_NOGHOST { master_notify($1); YYABORT; } > | PATH OPT_VERBOSE { master_notify($1); YYABORT; } >@@ -555,6 +557,7 @@ option: daemon_option > > daemon_option: OPT_TIMEOUT NUMBER { timeout = $2; } > | OPT_NTIMEOUT NUMBER { negative_timeout = $2; } >+ | OPT_NOBIND { nobind = 1; } > | OPT_NOGHOST { ghost = 0; } > | OPT_GHOST { ghost = 1; } > | OPT_VERBOSE { verbose = 1; } >@@ -624,6 +627,7 @@ static void local_init_vars(void) > debug = 0; > timeout = -1; > negative_timeout = 0; >+ nobind = 0; > ghost = defaults_get_browse_mode(); > random_selection = global_selection_options & MOUNT_FLAG_RANDOM_SELECT; > use_weight = 0; >@@ -786,7 +790,7 @@ int master_parse_entry(const char *buffe > } > > if (!entry->ap) { >- ret = master_add_autofs_point(entry, timeout, logopt, ghost, 0); >+ ret = master_add_autofs_point(entry, timeout, logopt, nobind, ghost, 0); > if (!ret) { > error(m_logopt, "failed to add autofs_point"); > if (new) >--- autofs-5.0.5.orig/lib/master_tok.l >+++ autofs-5.0.5/lib/master_tok.l >@@ -359,6 +359,7 @@ OPTNTOUT (-n{OPTWS}|-n{OPTWS}={OPTWS}|-- > return(NUMBER); > } > >+ -?nobind { return(OPT_NOBIND); } > -?nobrowse { return(OPT_NOGHOST); } > -g|--ghost|-?browse { return(OPT_GHOST); } > -v|--verbose { return(OPT_VERBOSE); } >--- autofs-5.0.5.orig/man/auto.master.5.in >+++ autofs-5.0.5/man/auto.master.5.in >@@ -139,13 +139,13 @@ multiple file systems should be mounted > is given, no file system is mounted at all if at least one file system > can't be mounted. > .TP >-.I "nosymlink" >+.I "nobind" > This is an autofs specific option that is a pseudo mount option and >-so is given without a leading dash. Historically this option was used >-to prevent symlinking of local NFS mounts. Nowadays it can be used to >-prevent bind mounting of local NFS filesystems as well. If you need to >-prevent bind mounting for only specific entrys in a map then this >-can be done by adding the "port=" mount option to the given entries. >+so is given without a leading dash. It may be used either in the master >+map entry (so it effects all the map entries) or with individual map >+entries to prevent bind mounting of local NFS filesystems. Bind mounting >+of NFS file systems can also be prevented for specific map entrys by >+adding the "port=" mount option to the entries. > .TP > .I "\-r, \-\-random-multimount-selection" > Enables the use of ramdom selection when choosing a host from a >--- autofs-5.0.5.orig/modules/mount_autofs.c >+++ autofs-5.0.5/modules/mount_autofs.c >@@ -48,7 +48,9 @@ int mount_mount(struct autofs_point *ap, > char realpath[PATH_MAX]; > char mountpoint[PATH_MAX]; > const char **argv; >- int argc, status, ghost = ap->flags & MOUNT_FLAG_GHOST; >+ int argc, status; >+ int nobind = ap->flags & MOUNT_FLAG_NOBIND; >+ int ghost = ap->flags & MOUNT_FLAG_GHOST; > time_t timeout = ap->exp_timeout; > unsigned logopt = ap->logopt; > struct map_type_info *info; >@@ -114,6 +116,8 @@ int mount_mount(struct autofs_point *ap, > > if (strncmp(cp, "nobrowse", 8) == 0) > ghost = 0; >+ else if (strncmp(cp, "nobind", 6) == 0) >+ nobind = 1; > else if (strncmp(cp, "browse", 6) == 0) > ghost = 1; > else if (strncmp(cp, "timeout=", 8) == 0) { >@@ -145,7 +149,7 @@ int mount_mount(struct autofs_point *ap, > return 1; > } > >- ret = master_add_autofs_point(entry, timeout, logopt, ghost, 1); >+ ret = master_add_autofs_point(entry, timeout, logopt, nobind, ghost, 1); > if (!ret) { > error(ap->logopt, > MODPREFIX "failed to add autofs_point to entry"); >--- autofs-5.0.5.orig/modules/mount_nfs.c >+++ autofs-5.0.5/modules/mount_nfs.c >@@ -65,6 +65,7 @@ int mount_mount(struct autofs_point *ap, > char *nfsoptions = NULL; > unsigned int flags = ap->flags & > (MOUNT_FLAG_RANDOM_SELECT | MOUNT_FLAG_USE_WEIGHT_ONLY); >+ int nobind = ap->flags & MOUNT_FLAG_NOBIND; > int len, status, err, existed = 1; > int nosymlink = 0; > int ro = 0; /* Set if mount bind should be read-only */ >@@ -115,6 +116,8 @@ int mount_mount(struct autofs_point *ap, > > if (strncmp("nosymlink", cp, end - cp + 1) == 0) { > nosymlink = 1; >+ } else if (strncmp("nobind", cp, end - cp + 1) == 0) { >+ nobind = 1; > } else if (strncmp("no-use-weight-only", cp, end - cp + 1) == 0) { > flags &= ~MOUNT_FLAG_USE_WEIGHT_ONLY; > } else if (strncmp("use-weight-only", cp, end - cp + 1) == 0) { >@@ -130,9 +133,9 @@ int mount_mount(struct autofs_point *ap, > } > } > >- debug(ap->logopt, >- MODPREFIX "nfs options=\"%s\", nosymlink=%d, ro=%d", >- nfsoptions, nosymlink, ro); >+ debug(ap->logopt, MODPREFIX >+ "nfs options=\"%s\", nobind=%d, nosymlink=%d, ro=%d", >+ nfsoptions, nobind, nosymlink, ro); > } > > mount_default_proto = defaults_get_mount_nfs_default_proto();
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 846870
: 610129 |
610130
|
610131
|
610132