]> git.michaelhowe.org Git - packages/o/openafs.git/commit
DEVEL15-windows-del-symlink-20071021
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 22 Oct 2007 04:30:04 +0000 (04:30 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 22 Oct 2007 04:30:04 +0000 (04:30 +0000)
commitd040d0e86d05266e701241abf2403c4800e37dc6
tree3bae9dd96a7c7bc1df56aa706c38e6479d772494
parent8d71c8f904010abf3e62463833eee9c91489b0aa
DEVEL15-windows-del-symlink-20071021

The cmd.exe "del" command operates by opening a file and then setting
the file disposition to delete on close followed by closing the file.

When the filename is a symlink, the smb_fid_t scp refers to the final
destination object and not the symlink.  In smb_CloseFid() the correct
object would be removed from the directory by name, but the wrong cm_scache_t
would be marked deleted.  This would result in subsequent references to
the target file being considered invalid.

Fix it by looking up the cm_scache_t of the symlink prior to performing
the deletion.

(cherry picked from commit f90153625efee1e5589df5e6b66a1162e07ddbfa)
src/WINNT/afsd/smb.c