]> git.pld-linux.org Git - packages/autofs.git/blame - autofs-4.1.3-strict.patch
- cleanups
[packages/autofs.git] / autofs-4.1.3-strict.patch
CommitLineData
e3a22658 1
2Problem: infinite error loop occurs when trying to access non-exitent
3 directory.
4
5This patch, for 4.1.3, fixes the problem caused when the default for
6multi-mounts was changed from strict to non-strict. This change tickled
7a bug in the old autofs4 kernel module found in 2.4 kernels and 2.6
8kernels to date (ie. < 2.6.7).
9
10This change in default caused a small change in mount logic which went
11unnoticed and lead to this problem. So the kernel interaction problem
12remains but is much less likely to occur. If this problem persists
13after applying this patch then update your kernel autofs4.
14
15The patch restores the previous logic but leaves the new default.
16
17diff -Nur autofs-4.1.3.orig/modules/parse_sun.c autofs-4.1.3/modules/parse_sun.c
18--- autofs-4.1.3.orig/modules/parse_sun.c 2004-05-18 20:22:40.000000000 +0800
19+++ autofs-4.1.3/modules/parse_sun.c 2004-05-29 15:38:42.000000000 +0800
20@@ -602,10 +602,8 @@
21 options);
22 }
23
24- if (nonstrict && rv) {
25- debug("ignoring failure of non-strict mount");
26- return 0;
27- }
28+ if (nonstrict && rv)
29+ return -rv;
30
31 return rv;
32 }
33@@ -746,7 +744,11 @@
34 free(loc);
35 free(myoptions);
36
37- if (rv)
38+ /* Convert non-strict failure into success */
39+ if (rv < 0) {
40+ rv = 0;
41+ debug("parse_mount: ignoring failure of non-strict mount");
42+ } else if (rv > 0)
43 break;
44
45 } while (*p == '/');
46@@ -789,6 +791,10 @@
47 options, loclen, loc);
48
49 rv = sun_mount(root, name, name_len, loc, loclen, options);
50+ /* non-strict failure to normal failure for ordinary mount */
51+ if (rv < 0)
52+ rv = -rv;
53+
54 free(loc);
55 free(options);
56 }
This page took 0.041555 seconds and 4 git commands to generate.