1 autofs-5.0.4 - use intr option as hosts mount default
3 From: Ian Kent <raven@themaw.net>
5 Use the "intr" option as default mount option for the hosts map
6 unless explicily overridden.
10 man/auto.master.5.in | 5 +++--
11 modules/parse_sun.c | 11 +++++++----
12 3 files changed, 11 insertions(+), 6 deletions(-)
15 diff --git a/CHANGELOG b/CHANGELOG
16 index 8258e00..a42dd14 100644
20 - reset flex scanner when setting buffer.
21 - zero s_magic is valid.
22 - use percent hack for master map keys.
23 +- use intr option as hosts mount default.
25 4/11/2008 autofs-5.0.4
26 -----------------------
27 diff --git a/man/auto.master.5.in b/man/auto.master.5.in
28 index aaa6324..7b7004f 100644
29 --- a/man/auto.master.5.in
30 +++ b/man/auto.master.5.in
31 @@ -208,8 +208,9 @@ For example, with an entry in the master map of
32 accessing /net/myserver will mount exports from myserver on directories below
35 -NOTE: mounts done from a hosts map will be mounted with the "nosuid" and "nodev" options
36 -unless the options "suid" and "dev" are explicitly given in the master map entry.
37 +NOTE: mounts done from a hosts map will be mounted with the "nosuid,nodev,intr" options
38 +unless overridden by explicily specifying the "suid", "dev" or "nointr" options in the
41 If the map type \fBldap\fP is specified the mapname is of the form
42 \fB[//servername/]dn\fP, where the optional \fBservername\fP is
43 diff --git a/modules/parse_sun.c b/modules/parse_sun.c
44 index 65417e1..db36ae2 100644
45 --- a/modules/parse_sun.c
46 +++ b/modules/parse_sun.c
47 @@ -607,9 +607,10 @@ static int sun_mount(struct autofs_point *ap, const char *root,
48 int len = strlen(options);
49 int suid = strstr(options, "suid") ? 0 : 7;
50 int dev = strstr(options, "dev") ? 0 : 6;
51 + int nointr = strstr(options, "nointr") ? 0 : 5;
54 - char *tmp = alloca(len + suid + dev + 1);
55 + if (suid || dev || nointr) {
56 + char *tmp = alloca(len + suid + dev + nointr + 1);
58 error(ap->logopt, MODPREFIX
59 "alloca failed for options");
60 @@ -623,10 +624,12 @@ static int sun_mount(struct autofs_point *ap, const char *root,
61 strcat(tmp, ",nosuid");
63 strcat(tmp, ",nodev");
65 + strcat(tmp, ",intr");
69 - char *tmp = alloca(13);
70 + char *tmp = alloca(18);
73 MODPREFIX "alloca failed for options");
74 @@ -634,7 +637,7 @@ static int sun_mount(struct autofs_point *ap, const char *root,
78 - strcpy(tmp, "nosuid,nodev");
79 + strcpy(tmp, "nosuid,nodev,intr");