- From 1770bd7ecf2b44c84b2bd60af11212ec4b049591 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 26 Aug 2024 14:59:55 +0200
- Subject: [PATCH 1/6] tests: nfsbuildtest should call GNU make with
- --load-average 32
- nfsbuildtest should call GNU make with --load-average 32, because
- the Cygwin load average does not work in Cygwin 3.6-devel
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/nfsbuildtest/nfsbuildtest.ksh93 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/tests/nfsbuildtest/nfsbuildtest.ksh93 b/tests/nfsbuildtest/nfsbuildtest.ksh93
- index e7b7003..4ea102b 100644
- --- a/tests/nfsbuildtest/nfsbuildtest.ksh93
- +++ b/tests/nfsbuildtest/nfsbuildtest.ksh93
- @@ -155,7 +155,7 @@ function gcc_build
- #
- # build gcc
- #
- - time ksh93 -c 'export SHELL=/bin/ksh93 ; (yes | make -j8 all)'
- + time ksh93 -c 'export SHELL=/bin/ksh93 ; (yes | make --load-average 32 -j8 all)'
- echo $?
- echo "#Done."
- --
- 2.45.1
- From a7dea1983cf8f600c30829bcd4d520dae14b0c4d Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 26 Aug 2024 15:16:58 +0200
- Subject: [PATCH 2/6] sys: Fix "Unhandled/unsupported InfoClass(6)",
- FileInternalInformation is implemented
- Fix bogus "Unhandled/unsupported InfoClass(6)" debug message,
- |FileInternalInformation| is implemented.
- Reported-by: Josh Hurst <joshhurst@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41_driver.c | 1 +
- 1 file changed, 1 insertion(+)
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index 2550321..d01c181 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -6084,6 +6084,7 @@ static NTSTATUS nfs41_QueryFileInformation(
- #endif
- break;
- case FileNetworkOpenInformation:
- + case FileInternalInformation:
- break;
- default:
- print_error("Unhandled/unsupported InfoClass(%d)\n", (int)InfoClass);
- --
- 2.45.1
- From 56c582f3c2bad6909234185bde552b0ac361b276 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 26 Aug 2024 15:25:26 +0200
- Subject: [PATCH 3/6] sys: Fix "Unhandled/unsupported InfoClass(35)",
- FileAttributeTagInformation is implemented
- Fix bogus "Unhandled/unsupported InfoClass(35)" debug message,
- |FileAttributeTagInformation| is implemented.
- Reported-by: Josh Hurst <joshhurst@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41_driver.c | 1 +
- 1 file changed, 1 insertion(+)
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index d01c181..7e0cd56 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -6085,6 +6085,7 @@ static NTSTATUS nfs41_QueryFileInformation(
- break;
- case FileNetworkOpenInformation:
- case FileInternalInformation:
- + case FileAttributeTagInformation:
- break;
- default:
- print_error("Unhandled/unsupported InfoClass(%d)\n", (int)InfoClass);
- --
- 2.45.1
- From 578aec22bb14d4f2f4768152b0ffcacb578613fd Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 26 Aug 2024 15:42:03 +0200
- Subject: [PATCH 4/6] build.vc19,daemon,include: Move "from_kernel.h" to
- include/
- Move "daemon/from_kernel.h" to "include/from_kernel.h", as it
- is a shared include file.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- build.vc19/nfsd/nfsd.vcxproj | 2 +-
- build.vc19/nfsd/nfsd.vcxproj.filters | 2 +-
- {daemon => include}/from_kernel.h | 0
- 3 files changed, 2 insertions(+), 2 deletions(-)
- rename {daemon => include}/from_kernel.h (100%)
- diff --git a/build.vc19/nfsd/nfsd.vcxproj b/build.vc19/nfsd/nfsd.vcxproj
- index 1823a19..9ff8e20 100644
- --- a/build.vc19/nfsd/nfsd.vcxproj
- +++ b/build.vc19/nfsd/nfsd.vcxproj
- @@ -218,7 +218,6 @@
- <ClInclude Include="..\..\daemon\cpvparser1.h" />
- <ClInclude Include="..\..\daemon\daemon_debug.h" />
- <ClInclude Include="..\..\daemon\delegation.h" />
- - <ClInclude Include="..\..\daemon\from_kernel.h" />
- <ClInclude Include="..\..\daemon\idmap.h" />
- <ClInclude Include="..\..\daemon\list.h" />
- <ClInclude Include="..\..\daemon\name_cache.h" />
- @@ -236,6 +235,7 @@
- <ClInclude Include="..\..\daemon\tree.h" />
- <ClInclude Include="..\..\daemon\upcall.h" />
- <ClInclude Include="..\..\daemon\util.h" />
- + <ClInclude Include="..\..\include\from_kernel.h" />
- <ClInclude Include="..\..\include\nfs_ea.h" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- diff --git a/build.vc19/nfsd/nfsd.vcxproj.filters b/build.vc19/nfsd/nfsd.vcxproj.filters
- index f4d1980..8d3c85a 100644
- --- a/build.vc19/nfsd/nfsd.vcxproj.filters
- +++ b/build.vc19/nfsd/nfsd.vcxproj.filters
- @@ -143,7 +143,7 @@
- <ClInclude Include="..\..\daemon\delegation.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- - <ClInclude Include="..\..\daemon\from_kernel.h">
- + <ClInclude Include="..\..\include\from_kernel.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\..\daemon\idmap.h">
- diff --git a/daemon/from_kernel.h b/include/from_kernel.h
- similarity index 100%
- rename from daemon/from_kernel.h
- rename to include/from_kernel.h
- --
- 2.45.1
- From a6ef9d1a3539ecd6af4fbfed4bdfd8386dc58ced Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 26 Aug 2024 16:43:24 +0200
- Subject: [PATCH 5/6] sys: Implement QueryFileInformation
- |FileRemoteProtocolInformation|
- Implement QueryFileInformation |FileRemoteProtocolInformation|.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41_driver.c | 23 +++++++++++++++++++++++
- 1 file changed, 23 insertions(+)
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index 7e0cd56..a091f36 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -5990,6 +5990,29 @@ static NTSTATUS nfs41_QueryFileInformation(
- status = STATUS_SUCCESS;
- goto out;
- }
- + case FileRemoteProtocolInformation:
- + {
- + PFILE_REMOTE_PROTOCOL_INFORMATION info =
- + (PFILE_REMOTE_PROTOCOL_INFORMATION)RxContext->Info.Buffer;
- +
- + (void)RtlZeroMemory(info,
- + sizeof(FILE_REMOTE_PROTOCOL_INFORMATION));
- + info->StructureVersion = 1;
- + info->StructureSize = sizeof(FILE_REMOTE_PROTOCOL_INFORMATION);
- + info->Protocol = WNNC_NET_RDR2SAMPLE; /* FIXME! */
- + /*
- + * ToDo: If we add NFSv4.1/NFSv4.2 protocol negotiation, then
- + * we need to call the userland daemon to return the correct
- + * protocol minor version
- + */
- + info->ProtocolMajorVersion = 4;
- + info->ProtocolMinorVersion = 1;
- + info->ProtocolRevision = 0;
- + RxContext->Info.LengthRemaining -=
- + sizeof(FILE_REMOTE_PROTOCOL_INFORMATION);
- + status = STATUS_SUCCESS;
- + goto out;
- + }
- case FileBasicInformation:
- case FileStandardInformation:
- case FileInternalInformation:
- --
- 2.45.1
- From f37daa791d773fc55208385227f4df84784aa13b Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Mon, 26 Aug 2024 17:02:50 +0200
- Subject: [PATCH 6/6] sys: buffer checks for QueryFileInformation
- |FileEaInformation|,|FileRemoteProtocolInformation|
- Add buffer size checks for QueryFileInformation |FileEaInformation|
- and |FileRemoteProtocolInformation|.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41_driver.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index a091f36..ee958d5 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -5983,6 +5983,14 @@ static NTSTATUS nfs41_QueryFileInformation(
- switch (InfoClass) {
- case FileEaInformation:
- {
- + if (RxContext->Info.LengthRemaining <
- + sizeof(FILE_EA_INFORMATION)) {
- + print_error("nfs41_QueryFileInformation: "
- + "FILE_EA_INFORMATION buffer too small\n");
- + status = STATUS_BUFFER_TOO_SMALL;
- + goto out;
- + }
- +
- PFILE_EA_INFORMATION info =
- (PFILE_EA_INFORMATION)RxContext->Info.Buffer;
- info->EaSize = 0;
- @@ -5992,6 +6000,14 @@ static NTSTATUS nfs41_QueryFileInformation(
- }
- case FileRemoteProtocolInformation:
- {
- + if (RxContext->Info.LengthRemaining <
- + sizeof(FILE_REMOTE_PROTOCOL_INFORMATION)) {
- + print_error("nfs41_QueryFileInformation: "
- + "FILE_REMOTE_PROTOCOL_INFORMATION buffer too small\n");
- + status = STATUS_BUFFER_TOO_SMALL;
- + goto out;
- + }
- +
- PFILE_REMOTE_PROTOCOL_INFORMATION info =
- (PFILE_REMOTE_PROTOCOL_INFORMATION)RxContext->Info.Buffer;
- --
- 2.45.1
msnfs41client: QueryFileInformation fixes+improvements, cleanup+misc, 2024-08-26
Posted by Anonymous on Mon 26th Aug 2024 17: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.