set REPARSE_POINT attr only if symlink_support attr is set
This commit is contained in:
parent
9c84f71623
commit
db1c02cc28
3 changed files with 9 additions and 3 deletions
|
|
@ -190,6 +190,7 @@ typedef struct __nfs41_file_info {
|
||||||
bool_t case_insensitive;
|
bool_t case_insensitive;
|
||||||
bool_t case_preserving;
|
bool_t case_preserving;
|
||||||
bool_t symlink_dir;
|
bool_t symlink_dir;
|
||||||
|
bool_t symlink_support;
|
||||||
} nfs41_file_info;
|
} nfs41_file_info;
|
||||||
|
|
||||||
#endif /* !__NFS41_DAEMON_TYPES_H__ */
|
#endif /* !__NFS41_DAEMON_TYPES_H__ */
|
||||||
|
|
|
||||||
|
|
@ -1552,6 +1552,10 @@ static bool_t decode_file_attrs(
|
||||||
if (!xdr_u_hyper(xdr, &info->size))
|
if (!xdr_u_hyper(xdr, &info->size))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (attrs->attrmask.arr[0] & FATTR4_WORD0_SYMLINK_SUPPORT) {
|
||||||
|
if (!xdr_bool(xdr, &info->symlink_support))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
if (attrs->attrmask.arr[0] & FATTR4_WORD0_FSID) {
|
if (attrs->attrmask.arr[0] & FATTR4_WORD0_FSID) {
|
||||||
if (!xdr_fsid(xdr, &info->fsid))
|
if (!xdr_fsid(xdr, &info->fsid))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ static int handle_volume_attributes(
|
||||||
/* query the case_ attributes of the root filesystem */
|
/* query the case_ attributes of the root filesystem */
|
||||||
nfs41_file_info info = { 0 };
|
nfs41_file_info info = { 0 };
|
||||||
bitmap4 attr_request = { 1, { FATTR4_WORD0_CASE_INSENSITIVE |
|
bitmap4 attr_request = { 1, { FATTR4_WORD0_CASE_INSENSITIVE |
|
||||||
FATTR4_WORD0_CASE_PRESERVING } };
|
FATTR4_WORD0_CASE_PRESERVING | FATTR4_WORD0_SYMLINK_SUPPORT} };
|
||||||
PFILE_FS_ATTRIBUTE_INFORMATION attr = &args->info.attribute;
|
PFILE_FS_ATTRIBUTE_INFORMATION attr = &args->info.attribute;
|
||||||
int status = NO_ERROR;
|
int status = NO_ERROR;
|
||||||
|
|
||||||
|
|
@ -108,8 +108,9 @@ static int handle_volume_attributes(
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
attr->FileSystemAttributes = FILE_SUPPORTS_REMOTE_STORAGE |
|
attr->FileSystemAttributes = FILE_SUPPORTS_REMOTE_STORAGE;
|
||||||
FILE_SUPPORTS_REPARSE_POINTS;
|
if (info.symlink_support)
|
||||||
|
attr->FileSystemAttributes |= FILE_SUPPORTS_REPARSE_POINTS;
|
||||||
if (info.case_preserving)
|
if (info.case_preserving)
|
||||||
attr->FileSystemAttributes |= FILE_CASE_PRESERVED_NAMES;
|
attr->FileSystemAttributes |= FILE_CASE_PRESERVED_NAMES;
|
||||||
if (!info.case_insensitive)
|
if (!info.case_insensitive)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue