handling hidden system archive file attributes
todo: still need to mask supported attributes while doing getattrs
This commit is contained in:
parent
68d97f5400
commit
49580a8cfe
10 changed files with 81 additions and 17 deletions
|
|
@ -1755,6 +1755,10 @@ static bool_t decode_file_attrs(
|
|||
if (!xdr_u_int32_t(xdr, &info->aclsupport))
|
||||
return FALSE;
|
||||
}
|
||||
if (attrs->attrmask.arr[0] & FATTR4_WORD0_ARCHIVE) {
|
||||
if (!xdr_bool(xdr, &info->archive))
|
||||
return FALSE;
|
||||
}
|
||||
if (attrs->attrmask.arr[0] & FATTR4_WORD0_CANSETTIME) {
|
||||
if (!xdr_bool(xdr, &info->cansettime))
|
||||
return FALSE;
|
||||
|
|
@ -1775,6 +1779,10 @@ static bool_t decode_file_attrs(
|
|||
if (!decode_fs_locations4(xdr, info->fs_locations))
|
||||
return FALSE;
|
||||
}
|
||||
if (attrs->attrmask.arr[0] & FATTR4_WORD0_HIDDEN) {
|
||||
if (!xdr_bool(xdr, &info->hidden))
|
||||
return FALSE;
|
||||
}
|
||||
if (attrs->attrmask.arr[0] & FATTR4_WORD0_MAXREAD) {
|
||||
if (!xdr_u_hyper(xdr, &info->maxread))
|
||||
return FALSE;
|
||||
|
|
@ -1821,6 +1829,10 @@ static bool_t decode_file_attrs(
|
|||
if (!xdr_u_hyper(xdr, &info->space_total))
|
||||
return FALSE;
|
||||
}
|
||||
if (attrs->attrmask.arr[1] & FATTR4_WORD1_SYSTEM) {
|
||||
if (!xdr_bool(xdr, &info->system))
|
||||
return FALSE;
|
||||
}
|
||||
if (attrs->attrmask.arr[1] & FATTR4_WORD1_TIME_ACCESS) {
|
||||
if (!xdr_nfstime4(xdr, &info->time_access))
|
||||
return FALSE;
|
||||
|
|
@ -2574,6 +2586,11 @@ static bool_t encode_file_attrs(
|
|||
return FALSE;
|
||||
attrs->attrmask.arr[0] |= FATTR4_WORD0_ACL;
|
||||
}
|
||||
if (info->attrmask.arr[0] & FATTR4_WORD0_ARCHIVE) {
|
||||
if (!xdr_bool(&localxdr, &info->archive))
|
||||
return FALSE;
|
||||
attrs->attrmask.arr[0] |= FATTR4_WORD0_ARCHIVE;
|
||||
}
|
||||
if (info->attrmask.arr[0] & FATTR4_WORD0_HIDDEN) {
|
||||
if (!xdr_bool(&localxdr, &info->hidden))
|
||||
return FALSE;
|
||||
|
|
@ -2586,6 +2603,11 @@ static bool_t encode_file_attrs(
|
|||
return FALSE;
|
||||
attrs->attrmask.arr[1] |= FATTR4_WORD1_MODE;
|
||||
}
|
||||
if (info->attrmask.arr[1] & FATTR4_WORD1_SYSTEM) {
|
||||
if (!xdr_bool(&localxdr, &info->system))
|
||||
return FALSE;
|
||||
attrs->attrmask.arr[1] |= FATTR4_WORD1_SYSTEM;
|
||||
}
|
||||
if (info->attrmask.arr[1] & FATTR4_WORD1_TIME_ACCESS_SET) {
|
||||
if (!xdr_settime4(&localxdr, &info->time_access, info->time_delta))
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue