All of lore.kernel.org
 help / color / mirror / Atom feed
* sshfs and target directory
@ 2009-12-22 23:11 Marc Weber
  2009-12-23 14:35 ` Ian Kent
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Weber @ 2009-12-22 23:11 UTC (permalink / raw)
  To: Marc Weber; +Cc: autofs

summary:

sshfs mounting user@host: works but user@host:/ does not.

I had to apply this patch:

diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index 65417e1..35d9edc 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -827,7 +827,7 @@ static int validate_location(char *loc)
 			    *ptr == '-' || *ptr == '.' || *ptr == '_' ||
 			    *ptr == ',' || *ptr == '(' || *ptr == ')' ||
 			    *ptr == '#' || *ptr == '@' || *ptr == ':' ||
-			    *ptr == '[' || *ptr == ']'))
+			    *ptr == '[' || *ptr == ']' || *ptr == '/' ))
 				return 0;
 			ptr++;
 		}



in order to make  this work which doesn't mount /root but /

rootlap   -fstype=fuse,rw,nodev,nonempty,noatime,max_read=65536,uid=1008,gid=100 \/nix\/store\/yfmbrb7d7hh9n6dyidypw7k1xcixxmmz-sshfs-wrapped\/bin/\sshfs-wrapped\#root@host\:\/

I'm not sure whether this is the perfect patch.

Probably the problem is that the trailing :/ triggers check_colon to
return 1 in validate_location which is then failing in the loop I
patched above because "/" was not a valid character.

Marc Weber

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: sshfs and target directory
  2009-12-22 23:11 sshfs and target directory Marc Weber
@ 2009-12-23 14:35 ` Ian Kent
       [not found]   ` <1261585222-sup-7226@nixos>
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Kent @ 2009-12-23 14:35 UTC (permalink / raw)
  To: Marc Weber; +Cc: autofs

Marc Weber wrote:
> summary:
> 
> sshfs mounting user@host: works but user@host:/ does not.
> 
> I had to apply this patch:
> 
> diff --git a/modules/parse_sun.c b/modules/parse_sun.c
> index 65417e1..35d9edc 100644
> --- a/modules/parse_sun.c
> +++ b/modules/parse_sun.c
> @@ -827,7 +827,7 @@ static int validate_location(char *loc)
>  			    *ptr == '-' || *ptr == '.' || *ptr == '_' ||
>  			    *ptr == ',' || *ptr == '(' || *ptr == ')' ||
>  			    *ptr == '#' || *ptr == '@' || *ptr == ':' ||
> -			    *ptr == '[' || *ptr == ']'))
> +			    *ptr == '[' || *ptr == ']' || *ptr == '/' ))
>  				return 0;
>  			ptr++;
>  		}
> 
> 
> 
> in order to make  this work which doesn't mount /root but /
> 
> rootlap   -fstype=fuse,rw,nodev,nonempty,noatime,max_read=65536,uid=1008,gid=100 \/nix\/store\/yfmbrb7d7hh9n6dyidypw7k1xcixxmmz-sshfs-wrapped\/bin/\sshfs-wrapped\#root@host\:\/
> 
> I'm not sure whether this is the perfect patch.
> 
> Probably the problem is that the trailing :/ triggers check_colon to
> return 1 in validate_location which is then failing in the loop I
> patched above because "/" was not a valid character.

Yes, this has come up recently and it's a bit painful.

If *ptr is a "/" then that is not valid in this case so we can do that.

But if you add a ":" escape to the beginning of the mount location this
check will not be made. I can't remember the sshfs syntax but something
like :sshfs#<user>@<host: should work OK.

Ian


> 
> Marc Weber
> 
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sshfs and target directory
       [not found]     ` <4B324E86.8040708@themaw.net>
@ 2009-12-23 17:21       ` Marc Weber
  0 siblings, 0 replies; 3+ messages in thread
From: Marc Weber @ 2009-12-23 17:21 UTC (permalink / raw)
  To: autofs

Sry, I missed posting this mail to the list in the first place. Doing so
now. Additional note:
alvin@mail.Linux-Consulting.com bounced as well so I don't know how to
contact the maintainer of the official howto.

> You asked about where we can put example scripts before.
> I add a contrib directory to the distribution but there isn't a web
> site. I have the domain name autofs.net but I don't have the time or
> inclination to put together and maintain a web site. Last I I posted to
> the list hinting at wanting someone interested in doing this I didn't
> get any responses.

I must have missed that.
I think it's bad that many people start blogging about autofs because
tehre is no uniq place to look for information.
So if you can setup any wiki (which shoud be done in 5 min) I'll try to
put up at least pointers to

a) the mailinglist archives
  http://linux.kernel.org/pipermail/autofs

b) the howto
  http://www.linux-consulting.com/Amd_AutoFS/autofs.html
  (I sent in email to Alvin. But I had to search for the newer mail
  address on this list..)

c) my script ;-)

d) Whatever you think is missing.

But in this case adding that line to the man page would have been enough :)

If you think it's worth starting a small wiki just for keeping things in
one place let me know about your server features and I'll try to find a
wiki which can be run on it.

Marc Weber

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-23 17:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 23:11 sshfs and target directory Marc Weber
2009-12-23 14:35 ` Ian Kent
     [not found]   ` <1261585222-sup-7226@nixos>
     [not found]     ` <4B324E86.8040708@themaw.net>
2009-12-23 17:21       ` Marc Weber

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.