- From 3f5105fb38c206282060ccf0ff50ca41b8e0935c Mon Sep 17 00:00:00 2001
- From: Cedric Blancher <cedric.blancher@gmail.com>
- Date: Sat, 30 Sep 2023 14:46:58 +0200
- Subject: [PATCH 1/5] nfsd: Fix typo with pointer deref
- nfsd: Fix typo in pointer derefencing in daemon/readdir.c
- Signed-off-by: Roland Mainz <roland.mainz@nrubsig.org>
- ---
- daemon/readdir.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/daemon/readdir.c b/daemon/readdir.c
- index 85af2c9..61e6fd7 100644
- --- a/daemon/readdir.c
- +++ b/daemon/readdir.c
- @@ -165,7 +165,7 @@ static void readdir_copy_shortname(
- /* GetShortPathName returns number of characters, not including \0 */
- *name_size_out = (CCHAR)GetShortPathNameW(name, name_out, 12);
- if (*name_size_out) {
- - *name_size_out++;
- + (*name_size_out)++;
- *name_size_out *= sizeof(WCHAR);
- }
- }
- --
- 2.39.0
- From a0db5bfd14a89b897fdc5ff7daea59844385e729 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Sat, 30 Sep 2023 14:50:48 +0200
- Subject: [PATCH 2/5] libtirpc: Fix warning about SOL_IPV6 redefine
- libtirpc: Fix warning about SOL_IPV6 redefine. The question is
- whether the original |#define SOL_IPV6 IPPROTO_IPV6| was ever correct.
- |IPPROTO_IPV6| is defined as |IPPROTO_IPV6 = 41|,
- but |SOL_IPV6| in WinDDK is defined as |SOL_IPV6 = (SOL_SOCKET-5)|,
- where |SOL_SOCKET = 0xffff|, |SOL_IPV6 == so 0xffff-5|, which is
- clearly not |41|.
- But this works:
- $ nfs_mount.exe -o sec=sys,port=2049 Z '[fe80::219:99ff:feae:73ce]:/export/home/rmainz'
- But... why ?
- But in any case the upcoming libtirpc update will just stomp over
- the problem, and in the meantime the patch switches the definition
- of |SOL_IPV6| to the official DDK value.
- Reviewed-by: Cedric Blancher <cedric.blancher@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- libtirpc/tirpc/wintirpc.h | 2 ++
- 1 file changed, 2 insertions(+)
- diff --git a/libtirpc/tirpc/wintirpc.h b/libtirpc/tirpc/wintirpc.h
- index 2789e0a..cb5ec4b 100644
- --- a/libtirpc/tirpc/wintirpc.h
- +++ b/libtirpc/tirpc/wintirpc.h
- @@ -81,7 +81,9 @@ struct timezone
- extern int gettimeofday(struct timeval *tv, struct timezone *tz);
- extern int asprintf(char **str, const char *fmt, ...);
- +#if(_WIN32_WINNT < 0x0501)
- #define SOL_IPV6 IPPROTO_IPV6
- +#endif
- #define MAXHOSTNAMELEN 256
- --
- 2.39.0
- From 2e99d9f68015b8baf7a8cf65a4d0fd7d36f0e47c Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Sat, 30 Sep 2023 15:01:16 +0200
- Subject: [PATCH 3/5] nfs41_driver: Fix number of arguments for mount call
- Fix number of arguments in mount call after we reworked
- custom NFS port number handling and moved them from being a seperate
- field to being part of the "hostname", now called being a "hostport"
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41_driver.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index 07e5b27..618eee9 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -615,7 +615,7 @@ NTSTATUS marshal_nfs41_mount(
- goto out;
- }
- header_len = *len + length_as_utf8(entry->u.Mount.srv_name) +
- - length_as_utf8(entry->u.Mount.root) + 4 * sizeof(DWORD);
- + length_as_utf8(entry->u.Mount.root) + 3 * sizeof(DWORD);
- if (header_len > buf_len) {
- status = STATUS_INSUFFICIENT_RESOURCES;
- goto out;
- --
- 2.39.0
- From 5ac6ef2da45ac99ac52f306c4749fbb87bb117fa Mon Sep 17 00:00:00 2001
- From: Cedric Blancher <cedric.blancher@gmail.com>
- Date: Sat, 30 Sep 2023 15:15:17 +0200
- Subject: [PATCH 4/5] sys/nfs41_driver.c: Fix missing brackets in
- check_nfs41_create_args()
- sys/nfs41_driver.c: Fix missing brackets in check_nfs41_create_args()
- Signed-off-by: Roland Mainz <roland.mainz@nrubsig.org>
- ---
- sys/nfs41_driver.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index 618eee9..7a8fe7a 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -3503,9 +3503,9 @@ NTSTATUS check_nfs41_create_args(
- if (Fcb->OpenCount && params->Disposition == FILE_SUPERSEDE) {
- if ((!RxContext->CurrentIrpSp->FileObject->SharedRead &&
- (params->DesiredAccess & FILE_READ_DATA)) ||
- - (!RxContext->CurrentIrpSp->FileObject->SharedWrite &&
- + ((!RxContext->CurrentIrpSp->FileObject->SharedWrite &&
- (params->DesiredAccess & (FILE_WRITE_DATA | FILE_APPEND_DATA |
- - FILE_WRITE_ATTRIBUTES)) ||
- + FILE_WRITE_ATTRIBUTES))) ||
- (!RxContext->CurrentIrpSp->FileObject->SharedDelete &&
- (params->DesiredAccess & DELETE)))) {
- status = STATUS_SHARING_VIOLATION;
- --
- 2.39.0
- From b8d588ba9ced0791bd84753ff1a1e3bbbf518d62 Mon Sep 17 00:00:00 2001
- From: Cedric Blancher <cedric.blancher@gmail.com>
- Date: Sat, 30 Sep 2023 15:19:39 +0200
- Subject: [PATCH 5/5] sys/nfs41_driver.c: Zero out some fields
- sys/nfs41_driver.c: Zero out some fields in
- nfs41_QueryVolumeInformation() and nfs41_Lock()
- Signed-off-by: Roland Mainz <roland.mainz@nrubsig.org>
- ---
- sys/nfs41_driver.c | 4 ++++
- 1 file changed, 4 insertions(+)
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index 7a8fe7a..cb473f0 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -4314,6 +4314,8 @@ NTSTATUS nfs41_QueryVolumeInformation(
- status = check_nfs41_dirquery_args(RxContext);
- if (status) goto out;
- + RtlZeroMemory(RxContext->Info.Buffer, RxContext->Info.LengthRemaining);
- +
- switch (InfoClass) {
- case FileFsVolumeInformation:
- if ((ULONG)RxContext->Info.LengthRemaining >= DevExt->VolAttrsLen) {
- @@ -6086,6 +6088,8 @@ NTSTATUS nfs41_Lock(
- t1 = KeQueryPerformanceCounter(NULL);
- #endif
- + poll_delay.QuadPart = 0;
- +
- #ifdef DEBUG_LOCK
- DbgEn();
- print_lock_args(RxContext);
- --
- 2.39.0
msnfs41client: Misc patches for 2023-09-30
Posted by Anonymous on Sat 30th Sep 2023 14:48
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.