symlink: set reparse tag for symlinks

getattr upcall for FileAttributeTagInformation sets ReparseTag=IO_REPARSE_TAG_SYMLINK

readdir upcall sets EaSize=IO_REPARSE_TAG_SYMLINK; this makes the 'dir' command show files as <SYMLINK>, and causes a FSCTL_GET_REPARSE_POINT to query the symlink target

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-09-23 12:17:04 -04:00 committed by unknown
parent bc0b161fc6
commit b51bd2f9d1
2 changed files with 4 additions and 2 deletions

View file

@ -102,7 +102,8 @@ int handle_getattr(nfs41_upcall *upcall)
break;
case FileAttributeTagInformation:
args->tag_info.FileAttributes = nfs_file_info_to_attributes(&info);
args->tag_info.ReparseTag = 0;
args->tag_info.ReparseTag = info.type == NF4LNK ?
IO_REPARSE_TAG_SYMLINK : 0;
break;
default:
eprintf("unhandled file query class %d\n", args->query_class);

View file

@ -190,7 +190,8 @@ static void readdir_copy_full_dir_info(
IN PFILE_DIR_INFO_UNION info)
{
readdir_copy_dir_info(entry, info);
info->fifdi.EaSize = 0;
info->fifdi.EaSize = entry->attr_info.type == NF4LNK ?
IO_REPARSE_TAG_SYMLINK : 0;
}
static void readdir_copy_both_dir_info(