* embedded spaces in automounter map options field @ 2004-08-17 14:08 Geoff Mishkin 2004-08-18 9:23 ` Ian Kent 0 siblings, 1 reply; 8+ messages in thread From: Geoff Mishkin @ 2004-08-17 14:08 UTC (permalink / raw) To: autofs -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have a situation that requires me to have embedded spaces in the options field of my automounter map. To make things trickier, the map has to be generated with an executable map. I am using shfs and have to use it's cmd mount option to force it to connect using a specific private key file. This requires there to be embedded spaces in the options field, like this: - -fstype=shfs,cmd="ssh -i /usr/keys/<username> <username>@<host>" Which causes the automounter to complain bitterly. Most of the information I've found is for having spaces in share names or mount points, but the advice given doesn't work in the options field. I've tried all kinds of quotes, backslashing, etc. I'd greatly appriciate help. Please CC me on replies as I am not subscribed to the list. --Geoff Mishkin <gmishkin@us.ibm.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBIhFXpH0X57UnVFoRAoChAJ9oQGxmeQse0iwBmmi6DlrSo6CziQCgyJ62 TiVrjLCwWxaFLvjs2wVZIKQ= =aOwF -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: embedded spaces in automounter map options field 2004-08-17 14:08 embedded spaces in automounter map options field Geoff Mishkin @ 2004-08-18 9:23 ` Ian Kent 2004-08-18 14:02 ` Geoff Mishkin 2004-08-19 12:51 ` program mount problem Greg Bradner 0 siblings, 2 replies; 8+ messages in thread From: Ian Kent @ 2004-08-18 9:23 UTC (permalink / raw) To: gmishkin; +Cc: autofs On Tue, 17 Aug 2004, Geoff Mishkin wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I have a situation that requires me to have embedded spaces in the options > field of my automounter map. To make things trickier, the map has to be > generated with an executable map. I am using shfs and have to use it's cmd > mount option to force it to connect using a specific private key file. This > requires there to be embedded spaces in the options field, like this: > > - -fstype=shfs,cmd="ssh -i /usr/keys/<username> <username>@<host>" > > Which causes the automounter to complain bitterly. Most of the information > I've found is for having spaces in share names or mount points, but the > advice given doesn't work in the options field. I've tried all kinds of > quotes, backslashing, etc. I'd greatly appriciate help. > > Please CC me on replies as I am not subscribed to the list. You don't say which version of autofs you are using? Ian ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: embedded spaces in automounter map options field 2004-08-18 9:23 ` Ian Kent @ 2004-08-18 14:02 ` Geoff Mishkin 2004-08-19 1:35 ` Ian Kent 2004-08-19 3:08 ` Ian Kent 2004-08-19 12:51 ` program mount problem Greg Bradner 1 sibling, 2 replies; 8+ messages in thread From: Geoff Mishkin @ 2004-08-18 14:02 UTC (permalink / raw) To: autofs; +Cc: Ian Kent -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It's autofs version 4.1.3. --Geoff Mishkin <gmishkin@bu.edu> On Wednesday 18 August 2004 05:23 am, you wrote: > On Tue, 17 Aug 2004, Geoff Mishkin wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > I have a situation that requires me to have embedded spaces in the > > options field of my automounter map. To make things trickier, the map > > has to be generated with an executable map. I am using shfs and have to > > use it's cmd mount option to force it to connect using a specific private > > key file. This requires there to be embedded spaces in the options > > field, like this: > > > > - -fstype=shfs,cmd="ssh -i /usr/keys/<username> <username>@<host>" > > > > Which causes the automounter to complain bitterly. Most of the > > information I've found is for having spaces in share names or mount > > points, but the advice given doesn't work in the options field. I've > > tried all kinds of quotes, backslashing, etc. I'd greatly appriciate > > help. > > > > Please CC me on replies as I am not subscribed to the list. > > You don't say which version of autofs you are using? > > Ian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBI2GYpH0X57UnVFoRAm4pAJ4lmMn2c3Z0i1sHqEg39zlEhjVf3QCfWtlO nWWAmp6dNEY/HYgKtQNzcjQ= =YPe4 -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: embedded spaces in automounter map options field 2004-08-18 14:02 ` Geoff Mishkin @ 2004-08-19 1:35 ` Ian Kent 2004-08-19 3:08 ` Ian Kent 1 sibling, 0 replies; 8+ messages in thread From: Ian Kent @ 2004-08-19 1:35 UTC (permalink / raw) To: gmishkin; +Cc: autofs On Wed, 18 Aug 2004, Geoff Mishkin wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > It's autofs version 4.1.3. OK. That sounds bad. I'll check it out soon as I can. Ian ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: embedded spaces in automounter map options field 2004-08-18 14:02 ` Geoff Mishkin 2004-08-19 1:35 ` Ian Kent @ 2004-08-19 3:08 ` Ian Kent 1 sibling, 0 replies; 8+ messages in thread From: Ian Kent @ 2004-08-19 3:08 UTC (permalink / raw) To: gmishkin; +Cc: autofs [-- Attachment #1: Type: TEXT/PLAIN, Size: 1227 bytes --] On Wed, 18 Aug 2004, Geoff Mishkin wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA1 > > > > > > I have a situation that requires me to have embedded spaces in the > > > options field of my automounter map. To make things trickier, the map > > > has to be generated with an executable map. I am using shfs and have to > > > use it's cmd mount option to force it to connect using a specific private > > > key file. This requires there to be embedded spaces in the options > > > field, like this: > > > > > > - -fstype=shfs,cmd="ssh -i /usr/keys/<username> <username>@<host>" > > > > > > Which causes the automounter to complain bitterly. Most of the > > > information I've found is for having spaces in share names or mount > > > points, but the advice given doesn't work in the options field. I've > > > tried all kinds of quotes, backslashing, etc. I'd greatly appriciate > > > help. On second thoughts if you are willing to try a patch then do this. From the autofs v4 directory on kernel.org obtain the patches: autofs-4.1.3-strict.patch autofs-4.1.3-mtab_lock.patch autofs-4.1.3-non_block_ping.patch autofs-4.1.3-bad_chdir.patch and then apply the attached patch and let me know how it goes. Ian [-- Attachment #2: Type: TEXT/PLAIN, Size: 2826 bytes --] diff -Nur autofs-4.1.3.orig/modules/mount_nfs.c autofs-4.1.3/modules/mount_nfs.c --- autofs-4.1.3.orig/modules/mount_nfs.c 2004-06-05 13:49:33.000000000 +0800 +++ autofs-4.1.3/modules/mount_nfs.c 2004-06-05 14:17:59.000000000 +0800 @@ -347,7 +347,7 @@ int local, err; int nosymlink = 0; - debug(MODPREFIX " root=%s name=%s what=%s, fstype=%s, options=%s", + debug(MODPREFIX "root=%s name=%s what=%s, fstype=%s, options=%s", root, name, what, fstype, options); whatstr = alloca(strlen(what) + 1); diff -Nur autofs-4.1.3.orig/modules/parse_sun.c autofs-4.1.3/modules/parse_sun.c --- autofs-4.1.3.orig/modules/parse_sun.c 2004-06-05 13:49:33.000000000 +0800 +++ autofs-4.1.3/modules/parse_sun.c 2004-06-05 14:17:59.000000000 +0800 @@ -618,7 +618,7 @@ { struct parse_context *ctxt = (struct parse_context *) context; char *pmapent, *options; - const char *p, *q; + const char *p; int mapent_len, rv; int optlen; @@ -688,6 +688,12 @@ } path = dequote(p, l = chunklen(p, 0)); + if (!path) { + error(MODPREFIX "out of memory"); + free(myoptions); + free(options); + return 1; + } pathlen = strlen(path); p += l; @@ -712,21 +718,11 @@ } while (*p == '-'); } - q = p; - while (*q && *q != '/') { - l = chunklen(q, 1); - q += l; - q = skipspace(q); - } - l = q - p; - - loc = dequote(p, l); - loclen = strlen(loc); - - if (loc == NULL || path == NULL) { + loc = dequote(p, l = chunklen(p, 1)); + if (!loc) { error(MODPREFIX "out of memory"); - free(loc); free(path); + free(myoptions); free(options); return 1; } @@ -734,6 +730,39 @@ p += l; p = skipspace(p); + while (*p && *p != '/') { + char *ent; + + ent = dequote(p, l = chunklen(p, 1)); + if (!ent) { + error(MODPREFIX "out of memory"); + free(path); + free(myoptions); + free(options); + return 1; + } + + loc = realloc(loc, strlen(loc) + l + 2); + if (!loc) { + error(MODPREFIX "out of memory"); + free(ent); + free(path); + free(myoptions); + free(options); + return 1; + } + + strcat(loc, " "); + strcat(loc, ent); + + free(ent); + + p += l; + p = skipspace(p); + } + + loclen = strlen(loc); + debug(MODPREFIX "multimount: %.*s on %.*s with options %s", loclen, loc, pathlen, path, myoptions); @@ -763,15 +792,7 @@ if (*p == ':') p++; /* Sun escape for entries starting with / */ - q = p; - while (*q) { - l = chunklen(q, 1); - q += l; - q = skipspace(q); - } - l = q - p; - - loc = dequote(p, l); + loc = dequote(p, chunklen(p, 1)); loclen = strlen(loc); if (loc == NULL) { [-- Attachment #3: Type: text/plain, Size: 140 bytes --] _______________________________________________ autofs mailing list autofs@linux.kernel.org http://linux.kernel.org/mailman/listinfo/autofs ^ permalink raw reply [flat|nested] 8+ messages in thread
* program mount problem 2004-08-18 9:23 ` Ian Kent 2004-08-18 14:02 ` Geoff Mishkin @ 2004-08-19 12:51 ` Greg Bradner 2004-08-19 15:16 ` raven 1 sibling, 1 reply; 8+ messages in thread From: Greg Bradner @ 2004-08-19 12:51 UTC (permalink / raw) To: autofs I just installed 4.1.3 with the autofs4-2.4.22-20040508.patch. I have a server with 10 mount points and I only have permission to mount 1. If I cd to one I don't have permission to, I get permission denied in the syslog, but it will keep 'looping' the name of the mount. the mount is /n3 - a program mount the server is ns16 - 10 mounts exported no permissions to mount e cd /n3/ns16/e/n3/ns16/e/n3/ns16/e/n3/ns16/e/ At end, I hit tab for file completion and will loop /n3/ns16/e over and over - were it would just stop at one /n3/ns16/e with autofs-4.1.0. I am running redhat 7.3 and a 2.4.26 kernel. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rhythm & Hues 5404 Jandy Place Los Angeles, CA 90066 Voice: 310 448-7763 Fax: 310 448-7600 gregb@rhythm.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: program mount problem 2004-08-19 12:51 ` program mount problem Greg Bradner @ 2004-08-19 15:16 ` raven 2004-08-19 16:21 ` Greg Bradner 0 siblings, 1 reply; 8+ messages in thread From: raven @ 2004-08-19 15:16 UTC (permalink / raw) To: Greg Bradner; +Cc: autofs On Thu, 19 Aug 2004, Greg Bradner wrote: > I just installed 4.1.3 with the autofs4-2.4.22-20040508.patch. I have a > server with 10 mount points and I only have permission to mount 1. If I > cd to one I don't have permission to, I get permission denied in the > syslog, but it will keep 'looping' the name of the mount. > > the mount is /n3 - a program mount > the server is ns16 - 10 mounts exported > no permissions to mount e > > cd /n3/ns16/e/n3/ns16/e/n3/ns16/e/n3/ns16/e/ > > At end, I hit tab for file completion and will loop /n3/ns16/e over and > over - were it would just stop at one /n3/ns16/e with autofs-4.1.0. > I am running redhat 7.3 and a 2.4.26 kernel. Could you get some debug log output please. Ian ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: program mount problem 2004-08-19 15:16 ` raven @ 2004-08-19 16:21 ` Greg Bradner 0 siblings, 0 replies; 8+ messages in thread From: Greg Bradner @ 2004-08-19 16:21 UTC (permalink / raw) To: autofs; +Cc: raven Option change. I was using -v to get the version of automount in order to load different auto_master files. I didn't notice yesterday it failed on booting. I noticed it today when adding the --verbose and --debug. Changed it to --version. And it works. I was also looking at an old automount(8) man page. Thanks and sorry for the false alarm. raven@themaw.net wrote: >On Thu, 19 Aug 2004, Greg Bradner wrote: > > > >>I just installed 4.1.3 with the autofs4-2.4.22-20040508.patch. I have a >>server with 10 mount points and I only have permission to mount 1. If I >>cd to one I don't have permission to, I get permission denied in the >>syslog, but it will keep 'looping' the name of the mount. >> >>the mount is /n3 - a program mount >>the server is ns16 - 10 mounts exported >>no permissions to mount e >> >>cd /n3/ns16/e/n3/ns16/e/n3/ns16/e/n3/ns16/e/ >> >>At end, I hit tab for file completion and will loop /n3/ns16/e over and >>over - were it would just stop at one /n3/ns16/e with autofs-4.1.0. >>I am running redhat 7.3 and a 2.4.26 kernel. >> >> > >Could you get some debug log output please. > >Ian > > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rhythm & Hues 5404 Jandy Place Los Angeles, CA 90066 Voice: 310 448-7763 Fax: 310 448-7600 gregb@rhythm.com ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-08-19 16:21 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-08-17 14:08 embedded spaces in automounter map options field Geoff Mishkin 2004-08-18 9:23 ` Ian Kent 2004-08-18 14:02 ` Geoff Mishkin 2004-08-19 1:35 ` Ian Kent 2004-08-19 3:08 ` Ian Kent 2004-08-19 12:51 ` program mount problem Greg Bradner 2004-08-19 15:16 ` raven 2004-08-19 16:21 ` Greg Bradner
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.