pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: nfsbuildtest msnfs41client code signing, log nfs minor version, 2025-06-05
Posted by Anonymous on Thu 5th Jun 2025 14:58
raw | new post

  1. From 06bdee535db2985de0461efb87f4b91da521a5a1 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Thu, 5 Jun 2025 13:51:29 +0200
  4. Subject: [PATCH 1/2] tests: nfsbuildtest msnfs41client build cmd should use
  5.  WDK test certificate for code signing
  6.  
  7. nfsbuildtest msnfs41client build cmd should use WDK test certificate
  8. for *.(exe|dll) code signing
  9.  
  10. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  11. ---
  12. tests/nfsbuildtest/nfsbuildtest.ksh93 | 3 +++
  13.  1 file changed, 3 insertions(+)
  14.  
  15. diff --git a/tests/nfsbuildtest/nfsbuildtest.ksh93 b/tests/nfsbuildtest/nfsbuildtest.ksh93
  16. index 8e4bb2a..13aa759 100644
  17. --- a/tests/nfsbuildtest/nfsbuildtest.ksh93
  18. +++ b/tests/nfsbuildtest/nfsbuildtest.ksh93
  19. @@ -522,6 +522,9 @@ function msnfs41client_build
  20.                 sed -i -E 's/<LinkIncremental>true<\/LinkIncremental>/<LinkIncremental>false<\/LinkIncremental>/g' $(find 'build.vc19' -name \*.vcxproj)
  21.         fi
  22.  
  23. +       # Use WDK test certificate to sign *.(exe|dll) files
  24. +       export CERTIFICATE_THUMBPRINT="$(powershell -c 'Get-ChildItem -Path Cert:\CurrentUser\My | Where-Object {$_.Subject -like "*WDKTestCert*"} | Select-Object -ExpandProperty Thumbprint')"
  25. +
  26.         #
  27.         # build ms-nfs41-client
  28.         #
  29. --
  30. 2.45.1
  31.  
  32. From 579098be4f2e83eaa018b361f6cb620a4f8d2c89 Mon Sep 17 00:00:00 2001
  33. From: Roland Mainz <roland.mainz@nrubsig.org>
  34. Date: Thu, 5 Jun 2025 15:20:22 +0200
  35. Subject: [PATCH 2/2] daemon: log entry for successful mount should log the NFS
  36.  minor version
  37.  
  38. Log entry for successful mount should log the NFS minor version,
  39. so admins can see which minor NFSv4 version is used.
  40.  
  41. Also demote related NFS minor version debug output to log level 1.
  42.  
  43. Reported-by: Lionel Cons <lionelcons1972@gmail.com>
  44. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  45. ---
  46. daemon/mount.c     | 13 ++++++++-----
  47.  daemon/namespace.c |  4 ++--
  48.  2 files changed, 10 insertions(+), 7 deletions(-)
  49.  
  50. diff --git a/daemon/mount.c b/daemon/mount.c
  51. index be8854f..06e7c78 100644
  52. --- a/daemon/mount.c
  53. +++ b/daemon/mount.c
  54. @@ -1,5 +1,6 @@
  55.  /* NFSv4.1 client for Windows
  56. - * Copyright (C) 2012 The Regents of the University of Michigan
  57. + * Copyright (C) 2012 The Regents of the University of Michigan
  58. + * Copyright (C) 2024-2025 Roland Mainz <roland.mainz@nrubsig.org>
  59.   *
  60.   * Olga Kornievskaia <aglo@umich.edu>
  61.   * Casey Bodley <cbodley@umich.edu>
  62. @@ -199,20 +200,22 @@ out:
  63.      if (status == 0) {
  64.  #ifdef NFS41_DRIVER_USE_AUTHENTICATIONID_FOR_MOUNT_NAMESPACE
  65.          logprintf("mount(hostport='%s', use_nfspubfh=%d, path='%s', "
  66. -            "authid=(0x%lx.0x%lx)) success, root=0x%p\n",
  67. +            "authid=(0x%lx.0x%lx)) success, root=0x%p, NFS version=4.%d\n",
  68.              args->hostport?args->hostport:"<NULL>",
  69.              (int)args->use_nfspubfh,
  70.              args->path?args->path:"<NULL>",
  71.              (long)authenticationid.HighPart,
  72.              (long)authenticationid.LowPart,
  73. -            root);
  74. +            root,
  75. +            (int)root->nfsminorvers);
  76.  #else
  77.          logprintf("mount(hostport='%s', use_nfspubfh=%d, path='%s') success, "
  78. -            "root=0x%p\n",
  79. +            "root=0x%p, NFS version=4.%d\n",
  80.              args->hostport?args->hostport:"<NULL>",
  81.              (int)args->use_nfspubfh,
  82.              args->path?args->path:"<NULL>",
  83. -            root);
  84. +            root,
  85. +            (int)root->nfsminorvers);
  86.  #endif /* NFS41_DRIVER_USE_AUTHENTICATIONID_FOR_MOUNT_NAMESPACE */
  87.      }
  88.      else {
  89. diff --git a/daemon/namespace.c b/daemon/namespace.c
  90. index 4511b52..b77b499 100644
  91. --- a/daemon/namespace.c
  92. +++ b/daemon/namespace.c
  93. @@ -414,7 +414,7 @@ int nfs41_root_mount_addrs(
  94.  
  95.  retry_nfs41_exchange_id:
  96.      if (nfsminorvers_autonegotiate) {
  97. -        DPRINTF(0, ("nfs41_root_mount_addrs: "
  98. +        DPRINTF(1, ("nfs41_root_mount_addrs: "
  99.              "Autonegotiating NFS version, "
  100.              "trying NFSv4.%d\n",
  101.              (int)root->nfsminorvers));
  102. @@ -449,7 +449,7 @@ retry_nfs41_exchange_id:
  103.  
  104.      /* Enable NFS features after NFSv4.x minor version negotiation */
  105.      if (root->nfsminorvers >= 2) {
  106. -        DPRINTF(0, ("nfs41_root_mount_addrs: Enabling NFSv4.2 OPs\n"));
  107. +        DPRINTF(1, ("nfs41_root_mount_addrs: Enabling NFSv4.2 OPs\n"));
  108.          root->supports_nfs42_read_plus  = true;
  109.          root->supports_nfs42_seek       = true;
  110.          root->supports_nfs42_allocate   = true;
  111. --
  112. 2.45.1

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