fix multi maps that have an implied '/' entry
PATCH 1/1 fix multi maps that have an implied '/' entry
This is apparently a legal format for a multi-mount map:
g3b segfault.boston.redhat.com:/export/automount/export5/testing/test \
/s1 segfault.boston.redhat.com:/export/automount/export2 \
/s2 segfault.boston.redhat.com:/export/automount/export3The first entry is an implied root level entry, or '/'. Solaris handles this case just fine, and the automounter test sweet uses this as one of its tests. The attached patch causes this map format to be recognized. I think the patch could probably re-use the memory allocatd for "path" by the dequote function. That's up to you, Ian, if you want to change that to be a little prettier.
-Jeff
modules/parse_sun.c renamed from modules/parse_sun.c.orig +12 -1
@@ -886,7 +886,18 @@ int parse_mount(const char *root, constreturn 1 ; } - p += l; +if (*path !='/' ) { +free (path); + path =strdup ("/" ); +if (!path) { +error (MODPREFIX "out of memory" ); +free (myoptions); +free (options); +multi_free_list (head); +return 1 ; + } + }else + p += l; p =skipspace (p);/* Local options are appended to per-map options */
[email protected]
maintainerQuoted 6 lines · Jeff Moyer
This is apparently a legal format for a multi-mount map:
g3b segfault.boston.redhat.com:/export/automount/export5/testing/test \ /s1 segfault.boston.redhat.com:/export/automount/export2 \ /s2 segfault.boston.redhat.com:/export/automount/export3
Quoted 6 lines
The first entry is an implied root level entry, or '/'. Solaris handles this case just fine, and the automounter test sweet uses this as one of its tests. The attached patch causes this map format to be recognized. I think the patch could probably re-use the memory allocatd for "path" by the dequote function. That's up to you, Ian, if you want to change that to be a little prettier.
I've already placed a patch on kernel.org for that.
Check out autofs-4.1.4-multi-parse-fix.patch and let me know what you think.
It also addresses the multi-mount recognition problem you mentioned a short while ago.
Ian
Patches for 4.1.4 (was: fix multi maps that have an implied '/' entry)
Quoted 3 lines · On Sat, Apr 30, 2005 at 11:12:56PM +0800, [email protected] wrote:
I've already placed a patch on kernel.org for that.
Check out autofs-4.1.4-multi-parse-fix.patch and let me know what you think.
I'm rapidly losing overview over what's going in and not here, with all the traffic :-) I'm planning an upload of autofs 4.1.4 to Debian unstable RSN; what patches do I want with this? Vanilla 4.1.4 + multi-parse-fix + non-replicated ping?
BTW: Ian, have you looked at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=305872 ? I'm not really sure what the & is supposed to mean :-)
/* Steinar */
Signature · 1 line
Homepage: http://www.sesse.net/
[email protected]
maintainerRe: Patches for 4.1.4 (was: fix multi maps that have an implied '/' entry)
Quoted 9 lines · Steinar H. Gunderson
Quoted 3 lines · On Sat, Apr 30, 2005 at 11:12:56PM +0800, [email protected] wrote:
I've already placed a patch on kernel.org for that.
Check out autofs-4.1.4-multi-parse-fix.patch and let me know what you think.I'm rapidly losing overview over what's going in and not here, with all the traffic :-) I'm planning an upload of autofs 4.1.4 to Debian unstable RSN; what patches do I want with this? Vanilla 4.1.4 + multi-parse-fix + non-replicated ping?
Sorry, I don't mean to be confusing.
This is the way that I do things normally.
Any smallish bug fixes that I think are really needed I post on kernel.org with the tarball.
I would recommend you include both of those patches.
Quoted 4 lines
BTW: Ian, have you looked at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=305872 ? I'm not really sure what the & is supposed to mean :-)
Interesting but not nearly enough information to resolve the issue. The problem that is reported shouldn't be happening.
Debug logs needed.
The & is a placeholder for the key and the * is the wildcard key.
In
* &:/var/local/bulk
if this map is mounted on /amnt then
ls /amnt/somehost
resolves to somehost:/var/local.bulk
Ian