nfs4: Allow WriteStat() to set UID and GID
This commit is contained in:
@@ -595,7 +595,7 @@ Inode::WriteStat(const struct stat* st, uint32 mask)
|
|||||||
{
|
{
|
||||||
status_t result;
|
status_t result;
|
||||||
OpenFileCookie* cookie = NULL;
|
OpenFileCookie* cookie = NULL;
|
||||||
AttrValue attr[4];
|
AttrValue attr[6];
|
||||||
uint32 i = 0;
|
uint32 i = 0;
|
||||||
|
|
||||||
if ((mask & B_STAT_SIZE) != 0) {
|
if ((mask & B_STAT_SIZE) != 0) {
|
||||||
@@ -623,6 +623,20 @@ Inode::WriteStat(const struct stat* st, uint32 mask)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((mask & B_STAT_UID) != 0) {
|
||||||
|
attr[i].fAttribute = FATTR4_OWNER;
|
||||||
|
attr[i].fFreePointer = true;
|
||||||
|
attr[i].fData.fPointer = gIdMapper->GetOwner(st->st_uid);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((mask & B_STAT_GID) != 0) {
|
||||||
|
attr[i].fAttribute = FATTR4_OWNER_GROUP;
|
||||||
|
attr[i].fFreePointer = true;
|
||||||
|
attr[i].fData.fPointer = gIdMapper->GetOwnerGroup(st->st_gid);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
if ((mask & B_STAT_ACCESS_TIME) != 0) {
|
if ((mask & B_STAT_ACCESS_TIME) != 0) {
|
||||||
attr[i].fAttribute = FATTR4_TIME_ACCESS_SET;
|
attr[i].fAttribute = FATTR4_TIME_ACCESS_SET;
|
||||||
attr[i].fFreePointer = true;
|
attr[i].fFreePointer = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user