I'm looking into how I can make autofs work with smb shares with spaces.
So far I've seen in the code that when using a program map, the function 
lookup_mount in lookup_program.c line reads data is read in to string mapent.
This string is the given to parse_mount in either parse_sun.c or 
parse_hesiod.c. I'm not sure which one.

When I read the function parse_mount in parse_hesiod, I see that 
parse_generic is called for smbfs (!{afs,err,nfs}).
So parse_generic receives a string like "-fstype=smbfs,ip=x.x.x.x,guest 
://THE NOID/share\n".

This function assumes something like "^\w+(\W+)\w+(\W+)\w+(\W+)\w", where the 
three \W's are fstype, source and options.
In this way, it is not possible to have spaces in the source. I think this 
can be fixed by checking for quotes around the source.
I'd like to have more opinions on this before I write a patch.

Of course, we have the possibility that I should have read parse_sun.c 
instead...

Best regards, Jos

Reply via email to