pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: Patches for filenames with Unicode non-BMP characters, missing FCB unlock, cleanup+misc, 2025-08-16
Posted by Anonymous on Sat 16th Aug 2025 17:19
raw | new post

  1. From 9f482599ce0a06894f290827aeac687ce1cb8d50 Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Sat, 16 Aug 2025 12:00:22 +0200
  4. Subject: [PATCH 1/5] sys: |nfs41_Create()| should release Fcb if it acquired
  5.  it itself
  6.  
  7. |nfs41_Create()| should release Fcb if it acquired it itself.
  8.  
  9. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  10. ---
  11. sys/nfs41sys_openclose.c | 15 ++++++++++++++-
  12.  1 file changed, 14 insertions(+), 1 deletion(-)
  13.  
  14. diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
  15. index fc1821f..1f75cae 100644
  16. --- a/sys/nfs41sys_openclose.c
  17. +++ b/sys/nfs41sys_openclose.c
  18. @@ -605,6 +605,7 @@ NTSTATUS nfs41_Create(
  19.      __notnull PNFS41_FCB nfs41_fcb = (PNFS41_FCB)Fcb->Context;
  20.      PNFS41_FOBX nfs41_fobx = NULL;
  21.      BOOLEAN oldDeletePending = nfs41_fcb->StandardInfo.DeletePending;
  22. +    bool fcb_locked_exclusive = false;
  23.  #ifdef ENABLE_TIMINGS
  24.      LARGE_INTEGER t1, t2;
  25.      t1 = KeQueryPerformanceCounter(NULL);
  26. @@ -839,7 +840,15 @@ retry_on_link:
  27.  
  28.      if (!RxIsFcbAcquiredExclusive(Fcb)) {
  29.          ASSERT(!RxIsFcbAcquiredShared(Fcb));
  30. -        RxAcquireExclusiveFcbResourceInMRx(Fcb);
  31. +
  32. +        DbgP("nfs41_Create: Fcb not locked exclusive\n");
  33. +
  34. +        NTSTATUS rxa_status;
  35. +        rxa_status = RxAcquireExclusiveFcbResourceInMRx(Fcb);
  36. +        if (!NT_SUCCESS(rxa_status)) {
  37. +            goto out;
  38. +        }
  39. +        fcb_locked_exclusive = true;
  40.      }
  41.  
  42.      RxContext->pFobx = RxCreateNetFobx(RxContext, SrvOpen);
  43. @@ -1057,6 +1066,10 @@ retry_on_link:
  44.      status = RxContext->CurrentIrp->IoStatus.Status = STATUS_SUCCESS;
  45.  
  46.  out:
  47. +    if (fcb_locked_exclusive) {
  48. +        RxReleaseFcbResourceInMRx(Fcb);
  49. +    }
  50. +
  51.      if (entry) {
  52.          nfs41_UpcallDestroy(entry);
  53.      }
  54. --
  55. 2.45.1
  56.  
  57. From f274d5c34417c2e82f8adaac1089dfd822d89a43 Mon Sep 17 00:00:00 2001
  58. From: Roland Mainz <roland.mainz@nrubsig.org>
  59. Date: Sat, 16 Aug 2025 12:28:59 +0200
  60. Subject: [PATCH 2/5] sys: Use macros to get the FCB/FOBX extensions
  61.  
  62. Use macros to get the FCB/FOBX extensions.
  63.  
  64. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  65. ---
  66. sys/nfs41sys_driver.c    | 2 +-
  67.  sys/nfs41sys_lock.c      | 4 ++--
  68.  sys/nfs41sys_openclose.c | 6 +++---
  69.  3 files changed, 6 insertions(+), 6 deletions(-)
  70.  
  71. diff --git a/sys/nfs41sys_driver.c b/sys/nfs41sys_driver.c
  72. index 4de1ab9..b079180 100644
  73. --- a/sys/nfs41sys_driver.c
  74. +++ b/sys/nfs41sys_driver.c
  75. @@ -1319,7 +1319,7 @@ VOID fcbopen_main(PVOID ctx)
  76.                      psrvEntry = psrvEntry->Flink;
  77.                  };
  78.              }
  79. -            nfs41_fcb = (PNFS41_FCB)cur->fcb->Context;
  80. +            nfs41_fcb = NFS41GetFcbExtension(cur->fcb);
  81.              nfs41_fcb->changeattr = entry->ChangeTime;
  82.  out:
  83.              nfs41_UpcallDestroy(entry);
  84. diff --git a/sys/nfs41sys_lock.c b/sys/nfs41sys_lock.c
  85. index 7bd2132..6be928c 100644
  86. --- a/sys/nfs41sys_lock.c
  87. +++ b/sys/nfs41sys_lock.c
  88. @@ -273,7 +273,7 @@ NTSTATUS nfs41_Lock(
  89.          NFS41GetNetRootExtension(SrvOpen->pVNetRoot->pNetRoot);
  90.  #ifdef NFS41_DRIVER_HACK_LOCKING_STORAGE32_RANGELOCK_PROBING
  91.      __notnull PMRX_FCB Fcb = RxContext->pFcb;
  92. -    __notnull PNFS41_FCB nfs41_fcb = (PNFS41_FCB)Fcb->Context;
  93. +    __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(Fcb);
  94.  #endif /* NFS41_DRIVER_HACK_LOCKING_STORAGE32_RANGELOCK_PROBING */
  95.      const ULONG flags = LowIoContext->ParamsFor.Locks.Flags;
  96.      LARGE_INTEGER poll_delay = {0};
  97. @@ -398,7 +398,7 @@ NTSTATUS nfs41_Unlock(
  98.          NFS41GetNetRootExtension(SrvOpen->pVNetRoot->pNetRoot);
  99.  #ifdef NFS41_DRIVER_HACK_LOCKING_STORAGE32_RANGELOCK_PROBING
  100.      __notnull PMRX_FCB Fcb = RxContext->pFcb;
  101. -    __notnull PNFS41_FCB nfs41_fcb = (PNFS41_FCB)Fcb->Context;
  102. +    __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(Fcb);
  103.  #endif /* NFS41_DRIVER_HACK_LOCKING_STORAGE32_RANGELOCK_PROBING */
  104.  #ifdef ENABLE_TIMINGS
  105.      LARGE_INTEGER t1, t2;
  106. diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
  107. index 1f75cae..c269bc1 100644
  108. --- a/sys/nfs41sys_openclose.c
  109. +++ b/sys/nfs41sys_openclose.c
  110. @@ -480,7 +480,7 @@ NTSTATUS check_nfs41_create_args(
  111.      __notnull PNFS41_NETROOT_EXTENSION pNetRootContext =
  112.          NFS41GetNetRootExtension(SrvOpen->pVNetRoot->pNetRoot);
  113.      __notnull PMRX_FCB Fcb = RxContext->pFcb;
  114. -    __notnull PNFS41_FCB nfs41_fcb = (PNFS41_FCB)Fcb->Context;
  115. +    __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(Fcb);
  116.      PFILE_FULL_EA_INFORMATION ea = (PFILE_FULL_EA_INFORMATION)
  117.          RxContext->CurrentIrp->AssociatedIrp.SystemBuffer;
  118.  
  119. @@ -602,7 +602,7 @@ NTSTATUS nfs41_Create(
  120.      __notnull PNFS41_NETROOT_EXTENSION pNetRootContext =
  121.          NFS41GetNetRootExtension(SrvOpen->pVNetRoot->pNetRoot);
  122.      __notnull PMRX_FCB Fcb = RxContext->pFcb;
  123. -    __notnull PNFS41_FCB nfs41_fcb = (PNFS41_FCB)Fcb->Context;
  124. +    __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(Fcb);
  125.      PNFS41_FOBX nfs41_fobx = NULL;
  126.      BOOLEAN oldDeletePending = nfs41_fcb->StandardInfo.DeletePending;
  127.      bool fcb_locked_exclusive = false;
  128. @@ -859,7 +859,7 @@ retry_on_link:
  129.  #ifdef DEBUG_OPEN
  130.      DbgP("nfs41_Create: created FOBX 0x%p\n", RxContext->pFobx);
  131.  #endif
  132. -    nfs41_fobx = (PNFS41_FOBX)(RxContext->pFobx)->Context;
  133. +    nfs41_fobx = NFS41GetFobxExtension(RxContext->pFobx);
  134.      nfs41_fobx->nfs41_open_state = entry->open_state;
  135.      if (nfs41_fobx->sec_ctx.ClientToken == NULL) {
  136.          status = nfs41_get_sec_ctx(SecurityImpersonation, &nfs41_fobx->sec_ctx);
  137. --
  138. 2.45.1
  139.  
  140. From 2bfbab701714d2b287505ba255f95117ae96ac15 Mon Sep 17 00:00:00 2001
  141. From: Roland Mainz <roland.mainz@nrubsig.org>
  142. Date: Sat, 16 Aug 2025 17:39:27 +0200
  143. Subject: [PATCH 3/5] daemon,sys,tests: Handle chars outside Unicode BMP
  144.  correctly
  145.  
  146. Handle characters outside the Unicode BMP (Basic Multilingual Plane)
  147. correctly.
  148.  
  149. Reported-by: Dan Shelton <dan.f.shelton@gmail.com>
  150. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  151. ---
  152. daemon/open.c            | 21 +++++++++++++++------
  153.  daemon/symlink.c         | 18 +++++++++++-------
  154.  sys/nfs41sys_openclose.c | 10 ++++++----
  155.  sys/nfs41sys_symlink.c   |  1 -
  156.  tests/manual_testing.txt | 21 ++++++++++++++++++++-
  157.  5 files changed, 52 insertions(+), 19 deletions(-)
  158.  
  159. diff --git a/daemon/open.c b/daemon/open.c
  160. index ae1540c..1076053 100644
  161. --- a/daemon/open.c
  162. +++ b/daemon/open.c
  163. @@ -1220,26 +1220,35 @@ static int marshall_open(unsigned char *buffer, uint32_t *length, nfs41_upcall *
  164.      if (status) goto out;
  165.      if (upcall->last_error == ERROR_REPARSE) {
  166.          unsigned short len = (args->symlink.len + 1) * sizeof(WCHAR);
  167. +        int wc_len;
  168.          status = safe_write(&buffer, length, &args->symlink_embedded, sizeof(BOOLEAN));
  169.          if (status) goto out;
  170.          BYTE tmp_symlinktarget_type = args->symlinktarget_type;
  171.          status = safe_write(&buffer, length, &tmp_symlinktarget_type, sizeof(BYTE));
  172.          if (status) goto out;
  173. -        status = safe_write(&buffer, length, &len, sizeof(len));
  174. -        if (status) goto out;
  175.          /*
  176.           * convert args->symlink to wchar
  177. -         * FIXME: What about |len| if we have characters outside the BMP ?
  178.           */
  179. -        if (*length <= len || !MultiByteToWideChar(CP_UTF8,
  180. +        unsigned short *wc_len_out = (unsigned short *)buffer;
  181. +        unsigned short dummy;
  182. +        status = safe_write(&buffer, length, &dummy, sizeof(dummy));
  183. +        if (status) goto out;
  184. +
  185. +        if (*length <= len) {
  186. +            status = ERROR_BUFFER_OVERFLOW;
  187. +            goto out;
  188. +        }
  189. +        wc_len = MultiByteToWideChar(CP_UTF8,
  190.              MB_ERR_INVALID_CHARS,
  191.              args->symlink.path, args->symlink.len,
  192. -            (LPWSTR)buffer, len / sizeof(WCHAR))) {
  193. +            (LPWSTR)buffer, len / sizeof(WCHAR));
  194. +        if (wc_len == 0) {
  195.              status = ERROR_BUFFER_OVERFLOW;
  196.              goto out;
  197.          }
  198.  
  199. -        *length -= len;
  200. +        *wc_len_out = (unsigned short)(wc_len*sizeof(wchar_t));
  201. +        *length -= *wc_len_out;
  202.      }
  203.      DPRINTF(2, ("NFS41_SYSOP_OPEN: downcall "
  204.          "open_state=0x%p "
  205. diff --git a/daemon/symlink.c b/daemon/symlink.c
  206. index 0a53de4..fef7970 100644
  207. --- a/daemon/symlink.c
  208. +++ b/daemon/symlink.c
  209. @@ -287,9 +287,12 @@ static int marshall_symlink_get(unsigned char *buffer, uint32_t *length,
  210.  {
  211.      symlink_upcall_args *args = &upcall->args.symlink;
  212.      unsigned short len = (args->target_get.len + 1) * sizeof(WCHAR);
  213. +    unsigned short dummy = 0;
  214.      int status = NO_ERROR;
  215. +    int wc_len;
  216.  
  217. -    status = safe_write(&buffer, length, &len, sizeof(len));
  218. +    unsigned short *wc_len_out = (unsigned short *)buffer;
  219. +    status = safe_write(&buffer, length, &dummy, sizeof(dummy));
  220.      if (status) goto out;
  221.  
  222.      if (*length <= len) {
  223. @@ -297,11 +300,11 @@ static int marshall_symlink_get(unsigned char *buffer, uint32_t *length,
  224.          goto out;
  225.      }
  226.  
  227. -    /* FIXME: What about |len| if we have characters outside the BMP ? */
  228. -    if (!MultiByteToWideChar(CP_UTF8,
  229. -            MB_ERR_INVALID_CHARS,
  230. -            args->target_get.path, args->target_get.len,
  231. -            (LPWSTR)buffer, len / sizeof(WCHAR))) {
  232. +    wc_len = MultiByteToWideChar(CP_UTF8,
  233. +        MB_ERR_INVALID_CHARS,
  234. +        args->target_get.path, args->target_get.len,
  235. +        (LPWSTR)buffer, len / sizeof(WCHAR));
  236. +    if (wc_len == 0) {
  237.          eprintf("marshall_symlink_get: "
  238.              "MultiByteToWideChar() failed, lasterr=%d\n",
  239.              (int)GetLastError());
  240. @@ -309,7 +312,8 @@ static int marshall_symlink_get(unsigned char *buffer, uint32_t *length,
  241.          goto out;
  242.      }
  243.  
  244. -    *length -= len;
  245. +    *wc_len_out = (unsigned short)(wc_len*sizeof(wchar_t));
  246. +    *length -= *wc_len_out;
  247.  
  248.  out:
  249.      return status;
  250. diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
  251. index c269bc1..f7bd38d 100644
  252. --- a/sys/nfs41sys_openclose.c
  253. +++ b/sys/nfs41sys_openclose.c
  254. @@ -283,11 +283,11 @@ NTSTATUS unmarshal_nfs41_open(
  255.          RtlCopyMemory(&tmp_symlinktarget_type, *buf, sizeof(BYTE));
  256.          cur->u.Open.symlinktarget_type = tmp_symlinktarget_type;
  257.          *buf += sizeof(BYTE);
  258. -        RtlCopyMemory(&cur->u.Open.symlink.MaximumLength, *buf,
  259. +        RtlCopyMemory(&cur->u.Open.symlink.Length, *buf,
  260.              sizeof(USHORT));
  261.          *buf += sizeof(USHORT);
  262. -        cur->u.Open.symlink.Length = cur->u.Open.symlink.MaximumLength -
  263. -            sizeof(WCHAR);
  264. +        cur->u.Open.symlink.MaximumLength =
  265. +            cur->u.Open.symlink.Length+sizeof(wchar_t);
  266.          cur->u.Open.symlink.Buffer = RxAllocatePoolWithTag(NonPagedPoolNx,
  267.              cur->u.Open.symlink.MaximumLength, NFS41_MM_POOLTAG);
  268.          if (cur->u.Open.symlink.Buffer == NULL) {
  269. @@ -296,7 +296,9 @@ NTSTATUS unmarshal_nfs41_open(
  270.              goto out;
  271.          }
  272.          RtlCopyMemory(cur->u.Open.symlink.Buffer, *buf,
  273. -            cur->u.Open.symlink.MaximumLength);
  274. +            cur->u.Open.symlink.Length);
  275. +        cur->u.Open.symlink.Buffer[cur->u.Open.symlink.Length/sizeof(wchar_t)] =
  276. +            L'\0';
  277.  #ifdef DEBUG_MARSHAL_DETAIL
  278.          DbgP("unmarshal_nfs41_open: ERROR_REPARSE -> '%wZ'\n", &cur->u.Open.symlink);
  279.  #endif
  280. diff --git a/sys/nfs41sys_symlink.c b/sys/nfs41sys_symlink.c
  281. index 43334a1..11b470f 100644
  282. --- a/sys/nfs41sys_symlink.c
  283. +++ b/sys/nfs41sys_symlink.c
  284. @@ -135,7 +135,6 @@ void unmarshal_nfs41_symlink(
  285.      }
  286.      RtlCopyMemory(cur->u.Symlink.target->Buffer, *buf,
  287.          cur->u.Symlink.target->Length);
  288. -    cur->u.Symlink.target->Length -= sizeof(UNICODE_NULL);
  289.  }
  290.  
  291.  NTSTATUS map_symlink_errors(
  292. diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
  293. index 9500021..c9a5fd6 100644
  294. --- a/tests/manual_testing.txt
  295. +++ b/tests/manual_testing.txt
  296. @@ -1,5 +1,5 @@
  297.  #
  298. -# ms-nfs41-client manual testing sequence, 2025-07-23
  299. +# ms-nfs41-client manual testing sequence, 2025-08-16
  300.  #
  301.  # Draft version, needs to be turned into automated tests
  302.  # if possible
  303. @@ -277,6 +277,25 @@ rm -f symlink1_to_h_tmp ; cmd /C 'mklink /D symlink1_to_h_tmp \\derfwpc5131_ipv4
  304.  # ("." is a relative symlink, just included here for more coverage)
  305.  ksh93 -c 'typeset -a a=( "/" "/usr" "/usr/" "/tmp" "/usr/bin" "$PWD" "/dev/null" "." ) ; for ((i=0 ; i < ${#a[@]} ; i++ )) ; do rm -f "syml$i" ; ln -sf "${a[$i]}" "syml$i" ; l="$(readlink "syml$i")" ; if [[ "$l" == "${a[$i]}" ]] ; then printf "OK test %d\n" i ; else printf "FAIL test %d\n" i ; fi ; done'
  306.  
  307. +#
  308. +# Tests for symlinks with characters outside the BMP (Basic Multilingual Plane)
  309. +# (Unicode "half moon" in this case)
  310. +#
  311. +# ToDo:
  312. +# - Use different characters with different byte lengths
  313. +# - Add more tests with relative and absolute paths
  314. +# - Add tests with subdirs with non-BMP characters
  315. +#
  316. +1. Original test:
  317. +---- snip ----
  318. +bash -c 'm="$(printf "\U0001f313")" ; echo "Unicode moon character in filename test OK" >"$m$m$m$m$m$m${m}x" && ln -sf "$m$m$m$m$m$m${m}x" "$m$m$m$m$m$m$m" && cat "$m$m$m$m$m$m${m}"'
  319. +Unicode moon character in filename test OK
  320. +---- snip ----
  321. +2. Mix of Unicode non-BMP characters and ASCII charatcers:
  322. +---- snip ----
  323. +bash -c 'set -o errexit ; m="$(printf "\U0001f313")" ; typeset filenames=( "$m$m$m$m$m$m$m" "$m$m$m$m$m$m$m$m" "x$m$m$m$m$m$m" "$m$m$m_$m$m$m" ) ; for fn in "${filenames[@]}" ; do printf "Unicode moon character in filename %q test OK\n" "$fn" >"${fn}x" && ln -sf "${fn}x" "${fn}" && cat "$fn" ; done' && ls -l && echo "## All tests OK"
  324. +---- snip ----
  325. +
  326.  #
  327.  # Test whether cmd.exe can follow symlink to "/" (root), which should point to C:cygwin64\ or C:\cygwin\
  328.  # (CYGWIN='winsymlinks:nativestrict' is used so the same test works with NTFS too)
  329. --
  330. 2.45.1
  331.  
  332. From 26d93a2686831fc1ee8a12a751dc19a5ffc7df71 Mon Sep 17 00:00:00 2001
  333. From: Roland Mainz <roland.mainz@nrubsig.org>
  334. Date: Sat, 16 Aug 2025 18:04:08 +0200
  335. Subject: [PATCH 4/5] daemon: Add new helper function
  336.  |get_safe_write_bufferpos()|
  337.  
  338. Add new helper function |get_safe_write_bufferpos()|.
  339.  
  340. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  341. ---
  342. daemon/open.c    |  6 +++---
  343.  daemon/symlink.c |  7 +++----
  344.  daemon/util.c    | 17 +++++++++++++++++
  345.  daemon/util.h    |  2 ++
  346.  4 files changed, 25 insertions(+), 7 deletions(-)
  347.  
  348. diff --git a/daemon/open.c b/daemon/open.c
  349. index 1076053..dd10c38 100644
  350. --- a/daemon/open.c
  351. +++ b/daemon/open.c
  352. @@ -1229,9 +1229,9 @@ static int marshall_open(unsigned char *buffer, uint32_t *length, nfs41_upcall *
  353.          /*
  354.           * convert args->symlink to wchar
  355.           */
  356. -        unsigned short *wc_len_out = (unsigned short *)buffer;
  357. -        unsigned short dummy;
  358. -        status = safe_write(&buffer, length, &dummy, sizeof(dummy));
  359. +        unsigned short *wc_len_out;
  360. +        status = get_safe_write_bufferpos(&buffer, length,
  361. +            sizeof(unsigned short), &wc_len_out);
  362.          if (status) goto out;
  363.  
  364.          if (*length <= len) {
  365. diff --git a/daemon/symlink.c b/daemon/symlink.c
  366. index fef7970..dc464f6 100644
  367. --- a/daemon/symlink.c
  368. +++ b/daemon/symlink.c
  369. @@ -287,13 +287,12 @@ static int marshall_symlink_get(unsigned char *buffer, uint32_t *length,
  370.  {
  371.      symlink_upcall_args *args = &upcall->args.symlink;
  372.      unsigned short len = (args->target_get.len + 1) * sizeof(WCHAR);
  373. -    unsigned short dummy = 0;
  374.      int status = NO_ERROR;
  375.      int wc_len;
  376.  
  377. -    unsigned short *wc_len_out = (unsigned short *)buffer;
  378. -    status = safe_write(&buffer, length, &dummy, sizeof(dummy));
  379. -    if (status) goto out;
  380. +    unsigned short *wc_len_out;
  381. +    status = get_safe_write_bufferpos(&buffer, length,
  382. +        sizeof(unsigned short), &wc_len_out);
  383.  
  384.      if (*length <= len) {
  385.          status = ERROR_BUFFER_OVERFLOW;
  386. diff --git a/daemon/util.c b/daemon/util.c
  387. index aac239d..f5d67ec 100644
  388. --- a/daemon/util.c
  389. +++ b/daemon/util.c
  390. @@ -61,6 +61,23 @@ int safe_write(unsigned char **pos, uint32_t *remaining, void *src, uint32_t src
  391.      return 0;
  392.  }
  393.  
  394. +/*
  395. + * |get_safe_write_bufferpos()| - like |safe_write()| but tests whether we
  396. + * have enough buffer space left, and in that case return current buffer
  397. + * position in |destbuffer|
  398. + */
  399. +int get_safe_write_bufferpos(unsigned char **pos, uint32_t *remaining, uint32_t src_len, void **destbuffer)
  400. +{
  401. +    if (*remaining < src_len)
  402. +        return ERROR_BUFFER_OVERFLOW;
  403. +
  404. +    *destbuffer = *pos;
  405. +    *pos += src_len;
  406. +    *remaining -= src_len;
  407. +    return ERROR_SUCCESS;
  408. +}
  409. +
  410. +
  411.  int get_name(unsigned char **pos, uint32_t *remaining, const char **out_name)
  412.  {
  413.      int status;
  414. diff --git a/daemon/util.h b/daemon/util.h
  415. index 53c0ad3..8dba1a9 100644
  416. --- a/daemon/util.h
  417. +++ b/daemon/util.h
  418. @@ -71,6 +71,8 @@ void *mempcpy(void *restrict dest, const void *restrict src, size_t n)
  419.  
  420.  int safe_read(unsigned char **pos, uint32_t *remaining, void *dest, uint32_t dest_len);
  421.  int safe_write(unsigned char **pos, uint32_t *remaining, void *dest, uint32_t dest_len);
  422. +int get_safe_write_bufferpos(unsigned char **pos, uint32_t *remaining,
  423. +    uint32_t src_len, void **destbuffer);
  424.  int get_name(unsigned char **pos, uint32_t *remaining, const char **out_name);
  425.  
  426.  const char* strip_path(
  427. --
  428. 2.45.1
  429.  
  430. From 91340b796dd64304ed5a6fb1e4b8d20a9bb47394 Mon Sep 17 00:00:00 2001
  431. From: Roland Mainz <roland.mainz@nrubsig.org>
  432. Date: Sat, 16 Aug 2025 18:10:50 +0200
  433. Subject: [PATCH 5/5] daemon: Remove empty |marshall_symlink_set()| function
  434.  
  435. Remove empty |marshall_symlink_set()| function.
  436.  
  437. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  438. ---
  439. daemon/symlink.c | 7 -------
  440.  1 file changed, 7 deletions(-)
  441.  
  442. diff --git a/daemon/symlink.c b/daemon/symlink.c
  443. index dc464f6..09cb07d 100644
  444. --- a/daemon/symlink.c
  445. +++ b/daemon/symlink.c
  446. @@ -409,15 +409,8 @@ out:
  447.      return status;
  448.  }
  449.  
  450. -static int marshall_symlink_set(unsigned char *buffer, uint32_t *length,
  451. -    nfs41_upcall *upcall)
  452. -{
  453. -    return NO_ERROR;
  454. -}
  455. -
  456.  const nfs41_upcall_op nfs41_op_symlink_set = {
  457.      .parse = parse_symlink_set,
  458.      .handle = handle_symlink_set,
  459. -    .marshall = marshall_symlink_set,
  460.      .arg_size = sizeof(symlink_upcall_args)
  461.  };
  462. --
  463. 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