diff --git a/daemon/nfs41_types.h b/daemon/nfs41_types.h index 19d9ac1..50a3487 100644 --- a/daemon/nfs41_types.h +++ b/daemon/nfs41_types.h @@ -191,6 +191,7 @@ typedef struct __nfs41_file_info { bool_t case_preserving; bool_t symlink_dir; bool_t symlink_support; + bool_t link_support; } nfs41_file_info; #endif /* !__NFS41_DAEMON_TYPES_H__ */ diff --git a/daemon/nfs41_xdr.c b/daemon/nfs41_xdr.c index 0c689b4..db919b8 100644 --- a/daemon/nfs41_xdr.c +++ b/daemon/nfs41_xdr.c @@ -1552,6 +1552,10 @@ static bool_t decode_file_attrs( if (!xdr_u_hyper(xdr, &info->size)) return FALSE; } + if (attrs->attrmask.arr[0] & FATTR4_WORD0_LINK_SUPPORT) { + if (!xdr_bool(xdr, &info->link_support)) + return FALSE; + } if (attrs->attrmask.arr[0] & FATTR4_WORD0_SYMLINK_SUPPORT) { if (!xdr_bool(xdr, &info->symlink_support)) return FALSE; diff --git a/daemon/volume.c b/daemon/volume.c index e25a42f..5e6fe34 100644 --- a/daemon/volume.c +++ b/daemon/volume.c @@ -96,7 +96,8 @@ static int handle_volume_attributes( /* query the case_ attributes of the root filesystem */ nfs41_file_info info = { 0 }; bitmap4 attr_request = { 1, { FATTR4_WORD0_CASE_INSENSITIVE | - FATTR4_WORD0_CASE_PRESERVING | FATTR4_WORD0_SYMLINK_SUPPORT} }; + FATTR4_WORD0_CASE_PRESERVING | FATTR4_WORD0_SYMLINK_SUPPORT | + FATTR4_WORD0_LINK_SUPPORT } }; PFILE_FS_ATTRIBUTE_INFORMATION attr = &args->info.attribute; int status = NO_ERROR; @@ -109,6 +110,8 @@ static int handle_volume_attributes( } attr->FileSystemAttributes = FILE_SUPPORTS_REMOTE_STORAGE; + if (info.link_support) + attr->FileSystemAttributes |= FILE_SUPPORTS_HARD_LINKS; if (info.symlink_support) attr->FileSystemAttributes |= FILE_SUPPORTS_REPARSE_POINTS; if (info.case_preserving)