Just-in-time mounts when following symlinks

Philip Kizer pckizer at tamu.edu
Thu Jun 4 15:48:52 GMT 1998

Luke Kenneth Casson Leighton <lkcl at switchboard.net> wrote:
>my suggestion to solve this was to have a function that either calls lstat
>or stat with a boolean switch.  then, identify _all_ SMB calls that make a
>stat or lstat calls.  then, subdivide them into calls that need to have
>the real file/directory time/date and those that could get away with the
>file/directory link time/date.  this _may_ require an smb.conf file list

The directory or file timestamp would never change from the viewpoint of
the client, then.  If the directory reading routines were made to only
lstat, then the only time infomation would be made available would be after
a file was opened to do an fstat.

>at a first guess, you could do lstat on directories, and stat on files.

But...until you stat the links to get the stat info on the target of the
link, you don't know whether it's a directory or a file.  How would
dos_mode() set the mode correctly from make_dir_struct() for the reply to
the client?  Wouldn't the client display incorrect info (in, for instance,
FileManager) if a link is a directory but information is not returned to
that effect so a file icon is create rather than a directory icon?

Please pardon if I just haven't looked at the code or protocols enough yet.

Philip Kizer <pckizer at tamu.edu>
Texas A&M CIS Operating Systems Group, Unix

More information about the samba-ntdom mailing list