- # Experimental FILE_ATTRIBUTE_TEMPORARY support
- diff --git a/daemon/util.c b/daemon/util.c
- index 3da52f1..286bf6d 100644
- --- a/daemon/util.c
- +++ b/daemon/util.c
- @@ -145,7 +145,7 @@ bool_t verify_commit(
- ULONG nfs_file_info_to_attributes(
- IN const nfs41_file_info *info)
- {
- - ULONG attrs = 0;
- + ULONG attrs = FILE_ATTRIBUTE_TEMPORARY;
- if (info->type == NF4DIR)
- attrs |= FILE_ATTRIBUTE_DIRECTORY;
- else if (info->type == NF4LNK) {
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index 8143840..4bb3d64 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -4459,6 +4459,9 @@ retry_on_link:
- !pVNetRootContext->read_only) || oldDeletePending)
- nfs41_fcb->StandardInfo.DeletePending = TRUE;
- +#if 1
- + entry->u.Open.binfo.FileAttributes |= FILE_ATTRIBUTE_TEMPORARY;
- +#endif
- RxFormInitPacket(InitPacket,
- &entry->u.Open.binfo.FileAttributes,
- &entry->u.Open.sinfo.NumberOfLinks,
- @@ -4477,6 +4480,13 @@ retry_on_link:
- RxFinishFcbInitialization(Fcb, RDBSS_STORAGE_NTC(StorageType),
- &InitPacket);
- +
- +#if 1
- + SetFlag(Fcb->FcbState, FCB_STATE_TEMPORARY);
- + if (RxContext->pFobx->AssociatedFileObject) {
- + SetFlag(RxContext->pFobx->AssociatedFileObject->Flags, FO_TEMPORARY_FILE);
- + }
- +#endif
- }
- #ifdef DEBUG_OPEN
- else
- @@ -6168,6 +6178,9 @@ static NTSTATUS nfs41_QueryFileInformation(
- case FileBasicInformation:
- RtlCopyMemory(&nfs41_fcb->BasicInfo, RxContext->Info.Buffer,
- sizeof(nfs41_fcb->BasicInfo));
- +#if 1
- + nfs41_fcb->BasicInfo.FileAttributes |= FILE_ATTRIBUTE_TEMPORARY;
- +#endif
- #ifdef DEBUG_FILE_QUERY
- print_basic_info(1, &nfs41_fcb->BasicInfo);
- #endif
Experimental FILE_ATTRIBUTE_TEMPORARY support
Posted by Anonymous on Mon 30th Sep 2024 14:03
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.