pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Backout |FSCTL_SET_PURGE_FAILURE_MODE| dummy support, Windows Server 2022 ACL fixes+misc, 2025-10-25
Posted by Anonymous on Sat 25th Oct 2025 16:29
raw | new post

  1. From a2df84eda86271c83e54a953f5bbd067f8baeb62 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Sat, 25 Oct 2025 12:27:54 +0200
  4. Subject: [PATCH 1/4] sys: Backout OpenAFS-like |FSCTL_SET_PURGE_FAILURE_MODE|
  5.  dummy support, causes Dpc-related crashes
  6.  
  7. Backout OpenAFS-like |FSCTL_SET_PURGE_FAILURE_MODE| dummy support
  8. (commit #77e3f6e5e25ff56cdcc53b4d3853a748abcc609b) because it somehow
  9. triggers Dpc-related crashes, e.g. like this one:
  10. ---- snip ----
  11. nt!KeBugCheckEx
  12. nt!KiBugCheckDispatch+0x69
  13. nt!KiFastFailDispatch+0xd0
  14. nt!KiRaiseSecurityCheckFailure+0x332
  15. nt!KiProcessExpiredTimerList+0x248
  16. nt!KiRetireDpcList+0x5dd
  17. nt!KiIdleLoop+0x9e
  18. ---- snip ----
  19.  
  20. |FSCTL_SET_PURGE_FAILURE_MODE| now again returns
  21. |STATUS_INVALID_DEVICE_REQUEST|, but we add a comment about this issue.
  22.  
  23. Reviewed-by: Dan Shelton <dan.f.shelton@gmail.com>
  24. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  25. ---
  26. sys/nfs41sys_fsctl.c | 11 +++++++----
  27.  1 file changed, 7 insertions(+), 4 deletions(-)
  28.  
  29. diff --git a/sys/nfs41sys_fsctl.c b/sys/nfs41sys_fsctl.c
  30. index f6d44da..eb5ff06 100644
  31. --- a/sys/nfs41sys_fsctl.c
  32. +++ b/sys/nfs41sys_fsctl.c
  33. @@ -1401,11 +1401,14 @@ NTSTATUS nfs41_FsCtl(
  34.          break;
  35.      case FSCTL_SET_PURGE_FAILURE_MODE:
  36.          /*
  37. -         * For the time being just succeed this call, as OpenAFS
  38. -         * does in openafs.git commit #0af079f2d03d1b76bd4221cb56b27091b5635fd0
  39. -         * (https://git.openafs.org/?p=openafs.git;a=commit;h=0af079f2d03d1b76bd4221cb56b27091b5635fd0)
  40. +         * We explicitly return here |STATUS_INVALID_DEVICE_REQUEST|, because
  41. +         * returning |STATUS_SUCCESS| like OpenAFS (see openafs.git commit
  42. +         * #0af079f2d03d1b76bd4221cb56b27091b5635fd0
  43. +         * (https://git.openafs.org/?p=openafs.git;a=commit;h=0af079f2d03d1b76bd4221cb56b27091b5635fd0))
  44. +         * somehow triggers Dpc-related crashes in
  45. +         * |KiProcessExpiredTimerList()|, e.g. when building gcc.
  46.           */
  47. -        status = STATUS_SUCCESS;
  48. +        status = STATUS_INVALID_DEVICE_REQUEST;
  49.          break;
  50.      default:
  51.          break;
  52. --
  53. 2.51.0
  54.  
  55. From 79f354f5d8083122d47eb86ee0033c5601d9e9e7 Mon Sep 17 00:00:00 2001
  56. From: Aurelien Couderc <aurelien.couderc2002@gmail.com>
  57. Date: Sat, 25 Oct 2025 12:43:18 +0200
  58. Subject: [PATCH 2/4] dll: Remove unneccesary double |wcslen()|
  59.  
  60. Remove unneccesary double |wcslen()|.
  61.  
  62. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  63. ---
  64. dll/nfs41_np.c | 7 +++----
  65.  1 file changed, 3 insertions(+), 4 deletions(-)
  66.  
  67. diff --git a/dll/nfs41_np.c b/dll/nfs41_np.c
  68. index 401dbe2..e536c76 100644
  69. --- a/dll/nfs41_np.c
  70. +++ b/dll/nfs41_np.c
  71. @@ -697,10 +697,9 @@ NPAddConnection3(
  72.  
  73.      (void)StringCchCatW(ConnectionName,
  74.          NFS41_SYS_MAX_PATH_LEN, &p[i]);
  75. -    DbgP((L"Full Connect Name: '%ls'\n", ConnectionName));
  76. -    DbgP((L"Full Connect Name Length: %d %d\n",
  77. -        (wcslen(ConnectionName) + 1) * sizeof(WCHAR),
  78. -        (wcslen(ConnectionName) + 1) * sizeof(WCHAR)));
  79. +    DbgP((L"Full Connect Name: name='%ls', len=%ld\n",
  80. +        ConnectionName,
  81. +        (long)(((wcslen(ConnectionName) + 1) * sizeof(WCHAR)))));
  82.  
  83.      if (lpNetResource->lpLocalName == NULL) {
  84.          DWORD gc_status;
  85. --
  86. 2.51.0
  87.  
  88. From bb1d314d8139625fc622e6e61b7c3c0937dabcaf Mon Sep 17 00:00:00 2001
  89. From: Roland Mainz <roland.mainz@nrubsig.org>
  90. Date: Sat, 25 Oct 2025 16:54:53 +0200
  91. Subject: [PATCH 3/4] daemon: Fix string of Windows "NULL SID" ACL
  92.  
  93. Fix string of Windows "NULL SID" ACL.
  94.  
  95. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  96. ---
  97. daemon/nfs41_const.h | 2 +-
  98.  1 file changed, 1 insertion(+), 1 deletion(-)
  99.  
  100. diff --git a/daemon/nfs41_const.h b/daemon/nfs41_const.h
  101. index 04adcc4..9873b7b 100644
  102. --- a/daemon/nfs41_const.h
  103. +++ b/daemon/nfs41_const.h
  104. @@ -504,7 +504,7 @@ enum nfs_ftype4 {
  105.  #define ACE4_WIN_CREATOR_OWNER_LEN (sizeof(ACE4_WIN_CREATOR_OWNER)-1)
  106.  #define ACE4_WIN_EVERYONE "Everyone@"
  107.  #define ACE4_WIN_EVERYONE_LEN (sizeof(ACE4_WIN_EVERYONE)-1)
  108. -#define ACE4_WIN_NULL_SID "NULL_SID"
  109. +#define ACE4_WIN_NULL_SID "NULL SID"
  110.  #define ACE4_WIN_NULL_SID_LEN (sizeof(ACE4_WIN_NULL_SID)-1)
  111.  #endif /* NFS41_DRIVER_WS2022_HACKS */
  112.  
  113. --
  114. 2.51.0
  115.  
  116. From 6eb8f0d4ef01a144f2527f809f3a5372cb49d02e Mon Sep 17 00:00:00 2001
  117. From: Roland Mainz <roland.mainz@nrubsig.org>
  118. Date: Sat, 25 Oct 2025 17:18:33 +0200
  119. Subject: [PATCH 4/4] daemon: Add "CREATOR GROUP" ACL for Windows Server 2022
  120.  
  121. Add "CREATOR GROUP" ACL for Windows Server 2022.
  122.  
  123. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  124. ---
  125. daemon/acl.c         | 4 ++++
  126.  daemon/nfs41_const.h | 2 ++
  127.  2 files changed, 6 insertions(+)
  128.  
  129. diff --git a/daemon/acl.c b/daemon/acl.c
  130. index 7a3cbb6..8675db2 100644
  131. --- a/daemon/acl.c
  132. +++ b/daemon/acl.c
  133. @@ -117,6 +117,10 @@ static int check_4_special_identifiers(const char *restrict who,
  134.  #endif /* NFS41_DRIVER_WS2022_HACKS */
  135.      else if (!strncmp(who, ACE4_GROUP, ACE4_GROUP_LEN-1))
  136.          type = WinCreatorGroupSid;
  137. +#ifdef NFS41_DRIVER_WS2022_HACKS
  138. +    else if (!strncmp(who, ACE4_WIN_CREATOR_GROUP, ACE4_WIN_CREATOR_GROUP_LEN-1))
  139. +        type = WinCreatorGroupSid;
  140. +#endif /* NFS41_DRIVER_WS2022_HACKS */
  141.      else if (!strncmp(who, ACE4_EVERYONE, ACE4_EVERYONE_LEN-1))
  142.          type = WinWorldSid;
  143.  #ifdef NFS41_DRIVER_WS2022_HACKS
  144. diff --git a/daemon/nfs41_const.h b/daemon/nfs41_const.h
  145. index 9873b7b..494ba91 100644
  146. --- a/daemon/nfs41_const.h
  147. +++ b/daemon/nfs41_const.h
  148. @@ -502,6 +502,8 @@ enum nfs_ftype4 {
  149.  /* Names used by Microsoft Windows 2019/2022 NFSv4.1 server */
  150.  #define ACE4_WIN_CREATOR_OWNER "CREATOR OWNER@"
  151.  #define ACE4_WIN_CREATOR_OWNER_LEN (sizeof(ACE4_WIN_CREATOR_OWNER)-1)
  152. +#define ACE4_WIN_CREATOR_GROUP "CREATOR GROUP@"
  153. +#define ACE4_WIN_CREATOR_GROUP_LEN (sizeof(ACE4_WIN_CREATOR_GROUP)-1)
  154.  #define ACE4_WIN_EVERYONE "Everyone@"
  155.  #define ACE4_WIN_EVERYONE_LEN (sizeof(ACE4_WIN_EVERYONE)-1)
  156.  #define ACE4_WIN_NULL_SID "NULL SID"
  157. --
  158. 2.51.0

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.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at