On 17-Jul-99 Roy Stogner wrote:
> Would it have to remount the directories? It would have to do so to
> get accurate owner/permissions, I suppose, but for most cases just
> pulling the directory names out of the config file, and giving them
> fake permissions like root.root 0660 would be preferable to not having
> them visible at all.
That would be pretty ugly to implement. From the kernel, its hard to tell how
a directory is being used. ls may only be doing a stat() to work out ownership
and permissions, but by the time it gets to the filesystem code in the kernel it
looks more-or-less like a chdir or the first part of a create or any number of
other operations. You could defer the mount until you really know you need to,
but that would add lots of complexity.
> By the way, I did look at your page of autofs patches, and I'm
> definitely interested in the idea of executable maps returning many
> mount points. With something like that, it seems to me, you could put
> together a solid Network Neighborhood with smbfs and a quick perl
> script around smbclient to scan local and user-configured subnets...
> I know a lot of people who would be overjoyed to see Linux do that.
>
> The problem is that the list of shares you want mountable changes
> while you're booted up (as other computers are turned on/off, as
> shares are created/destroyed, etc.) and AFAIK automount only runs
> program maps once.
No, it runs the script every time it needs to do the mount. When you actually
do the 'cd /net/foo' it runs the appropriate script and uses the output to work
out what to actually mount. I've been using it for mounting a whole tree off
an NFS server, but I guess you could use it for mounting a whole SMB network
using submounts or something... I may have broken submounts since I haven't
used them, but it should be reasonably easy to fix.
J