pastebin - collaborative debugging tool
rovema.kpaste.net RSS


msnfs41client: libtirpc/CVE backports+misc patches for 2023-10-18
Posted by Anonymous on Wed 18th Oct 2023 17:47
raw | new post

  1. From 6ba7818406e41226b1df3d2df60430728b16bd3a Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Wed, 18 Oct 2023 15:33:51 +0200
  4. Subject: [PATCH 1/7] nfs_daemon: daemon should print an indicator whether
  5.  idmap uses Cygwin
  6.  
  7. nfs_daemon should print an indicator whether idmap uses Cygwin
  8. as idmapping service, i.e. "idmap_cygwin is 1" in
  9. "parse_cmdlineargs: debug_level 0 ldap is 0 idmap_cygwin is 1".
  10.  
  11. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  12. ---
  13. daemon/nfs41_daemon.c | 7 ++++++-
  14.  1 file changed, 6 insertions(+), 1 deletion(-)
  15.  
  16. diff --git a/daemon/nfs41_daemon.c b/daemon/nfs41_daemon.c
  17. index c7fc140..42bfc6c 100644
  18. --- a/daemon/nfs41_daemon.c
  19. +++ b/daemon/nfs41_daemon.c
  20. @@ -238,7 +238,12 @@ static bool_t parse_cmdlineargs(int argc, TCHAR *argv[], nfsd_args *out)
  21.                  fprintf(stderr, "Unrecognized option '%s', disregarding.\n", argv[i]);
  22.          }
  23.      }
  24. -    fprintf(stdout, "parse_cmdlineargs: debug_level %d ldap is %d\n",
  25. +
  26. +    (void)fprintf(stdout, "parse_cmdlineargs: debug_level %d ldap is %d "
  27. +#ifdef NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN
  28. +        "idmap_cygwin is 1 "
  29. +#endif /* NFS41_DRIVER_FEATURE_NAMESERVICE_CYGWIN */
  30. +        "\n",
  31.          out->debug_level, out->ldap_enable);
  32.      return TRUE;
  33.  }
  34. --
  35. 2.39.0
  36.  
  37. From 301111b8466217b67bc24fc805a32af9bdf09750 Mon Sep 17 00:00:00 2001
  38. From: Martin Wege <martin.l.wege@gmail.com>
  39. Date: Thu, 24 Mar 2022 02:46:53 +0300
  40. Subject: [PATCH 2/7] Do not declare global variables in a header
  41.  
  42. Port ReactOS 5632aa5d82e244f16edec2b5991f2ea952bd2094 ("[LIBTIRPC] Do
  43. not declare global variables in a header")
  44. Original patch by Victor Perevertkin <victor.perevertkin@reactos.org>
  45.  
  46. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  47. ---
  48. libtirpc/src/rpc_com.h        | 5 ++---
  49.  libtirpc/src/rpc_commondata.c | 3 +++
  50.  2 files changed, 5 insertions(+), 3 deletions(-)
  51.  
  52. diff --git a/libtirpc/src/rpc_com.h b/libtirpc/src/rpc_com.h
  53. index 0658438..a69d7f0 100644
  54. --- a/libtirpc/src/rpc_com.h
  55. +++ b/libtirpc/src/rpc_com.h
  56. @@ -92,9 +92,8 @@ bool_t __xdrrec_getrec(XDR *, enum xprt_stat *, bool_t);
  57.  void __xprt_unregister_unlocked(SVCXPRT *);
  58.  void __xprt_set_raddr(SVCXPRT *, const struct sockaddr_storage *);
  59.  
  60. -
  61. -SVCXPRT **__svc_xports;
  62. -int __svc_maxrec;
  63. +extern SVCXPRT **__svc_xports;
  64. +extern int __svc_maxrec;
  65.  
  66.  __END_DECLS
  67.  
  68. diff --git a/libtirpc/src/rpc_commondata.c b/libtirpc/src/rpc_commondata.c
  69. index ec8d3fb..3b2a9e5 100644
  70. --- a/libtirpc/src/rpc_commondata.c
  71. +++ b/libtirpc/src/rpc_commondata.c
  72. @@ -37,3 +37,6 @@
  73.  struct opaque_auth _null_auth;
  74.  fd_set svc_fdset;
  75.  int svc_maxfd = -1;
  76. +
  77. +SVCXPRT **__svc_xports;
  78. +int __svc_maxrec;
  79. --
  80. 2.39.0
  81.  
  82. From ed1e009d4d87dcdd4a2744e7a2868e4578f8073b Mon Sep 17 00:00:00 2001
  83. From: Martin Wege <martin.l.wege@gmail.com>
  84. Date: Sun, 15 Oct 2017 13:54:11 +0200
  85. Subject: [PATCH 3/7] Fix CVE-2017-8779 by backporting its fix
  86.  
  87. Port ReactOS 6808e7d25b8262f70011e53f3dc46db7aa0813fa ("Fix
  88. CVE-2017-8779 by backporting its fix")
  89. Original patch by Pierre Schweitzer <pierre@reactos.org>
  90.  
  91. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  92. ---
  93. libtirpc/src/rpc_generic.c | 14 +++++++++++
  94.  libtirpc/src/rpcb_prot.c   | 44 +++++++++++++++++++++++++++++++++
  95.  libtirpc/src/rpcb_st_xdr.c | 19 +++++++++++++++
  96.  libtirpc/src/xdr.c         | 50 ++++++++++++++++++++++++++++++++++++++
  97.  4 files changed, 127 insertions(+)
  98.  
  99. diff --git a/libtirpc/src/rpc_generic.c b/libtirpc/src/rpc_generic.c
  100. index bcf4d42..42dca45 100644
  101. --- a/libtirpc/src/rpc_generic.c
  102. +++ b/libtirpc/src/rpc_generic.c
  103. @@ -654,6 +654,11 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf)
  104.  
  105.         switch (af) {
  106.         case AF_INET:
  107. +#ifdef _WIN32 // CVE-2017-8779
  108. +               if (nbuf->len < sizeof(*sin)) {
  109. +                       return NULL;
  110. +               }
  111. +#endif
  112.                 sin = nbuf->buf;
  113.                 if (inet_ntop(af, &sin->sin_addr, namebuf, sizeof namebuf)
  114.                     == NULL)
  115. @@ -665,6 +670,11 @@ __rpc_taddr2uaddr_af(int af, const struct netbuf *nbuf)
  116.                 break;
  117.  #ifdef INET6
  118.         case AF_INET6:
  119. +#ifdef _WIN32 // CVE-2017-8779
  120. +               if (nbuf->len < sizeof(*sin6)) {
  121. +                       return NULL;
  122. +               }
  123. +#endif
  124.                 sin6 = nbuf->buf;
  125.                 if (inet_ntop(af, &sin6->sin6_addr, namebuf6, sizeof namebuf6)
  126.                     == NULL)
  127. @@ -711,6 +721,10 @@ __rpc_uaddr2taddr_af(int af, const char *uaddr)
  128.  
  129.         port = 0;
  130.         sin = NULL;
  131. +#ifdef _WIN32 // CVE-2017-8779
  132. +       if (uaddr == NULL)
  133. +               return NULL;
  134. +#endif
  135.         addrstr = strdup(uaddr);
  136.         if (addrstr == NULL)
  137.                 return NULL;
  138. diff --git a/libtirpc/src/rpcb_prot.c b/libtirpc/src/rpcb_prot.c
  139. index 0b762d1..ea8bef7 100644
  140. --- a/libtirpc/src/rpcb_prot.c
  141. +++ b/libtirpc/src/rpcb_prot.c
  142. @@ -42,6 +42,9 @@
  143.  #include <rpc/types.h>
  144.  #include <rpc/xdr.h>
  145.  #include <rpc/rpcb_prot.h>
  146. +#ifdef _WIN32 // CVE-2017-8779
  147. +#include "rpc_com.h"
  148. +#endif
  149.  
  150.  bool_t
  151.  xdr_rpcb(xdrs, objp)
  152. @@ -54,6 +57,7 @@ xdr_rpcb(xdrs, objp)
  153.         if (!xdr_u_int32_t(xdrs, &objp->r_vers)) {
  154.                 return (FALSE);
  155.         }
  156. +#ifndef _WIN32 // CVE-2017-8779
  157.         if (!xdr_string(xdrs, &objp->r_netid, (u_int)~0)) {
  158.                 return (FALSE);
  159.         }
  160. @@ -63,6 +67,17 @@ xdr_rpcb(xdrs, objp)
  161.         if (!xdr_string(xdrs, &objp->r_owner, (u_int)~0)) {
  162.                 return (FALSE);
  163.         }
  164. +#else
  165. +       if (!xdr_string(xdrs, &objp->r_netid, RPC_MAXDATASIZE)) {
  166. +               return (FALSE);
  167. +       }
  168. +       if (!xdr_string(xdrs, &objp->r_addr, RPC_MAXDATASIZE)) {
  169. +               return (FALSE);
  170. +       }
  171. +       if (!xdr_string(xdrs, &objp->r_owner, RPC_MAXDATASIZE)) {
  172. +               return (FALSE);
  173. +       }
  174. +#endif
  175.         return (TRUE);
  176.  }
  177.  
  178. @@ -160,21 +175,39 @@ xdr_rpcb_entry(xdrs, objp)
  179.         XDR *xdrs;
  180.         rpcb_entry *objp;
  181.  {
  182. +#ifndef _WIN32 // CVE-2017-8779
  183.         if (!xdr_string(xdrs, &objp->r_maddr, (u_int)~0)) {
  184.                 return (FALSE);
  185.         }
  186.         if (!xdr_string(xdrs, &objp->r_nc_netid, (u_int)~0)) {
  187.                 return (FALSE);
  188.         }
  189. +#else
  190. +       if (!xdr_string(xdrs, &objp->r_maddr, RPC_MAXDATASIZE)) {
  191. +               return (FALSE);
  192. +       }
  193. +       if (!xdr_string(xdrs, &objp->r_nc_netid, RPC_MAXDATASIZE)) {
  194. +               return (FALSE);
  195. +       }
  196. +#endif
  197.         if (!xdr_u_int32_t(xdrs, &objp->r_nc_semantics)) {
  198.                 return (FALSE);
  199.         }
  200. +#ifndef _WIN32 // CVE-2017-8779
  201.         if (!xdr_string(xdrs, &objp->r_nc_protofmly, (u_int)~0)) {
  202.                 return (FALSE);
  203.         }
  204.         if (!xdr_string(xdrs, &objp->r_nc_proto, (u_int)~0)) {
  205.                 return (FALSE);
  206.         }
  207. +#else
  208. +       if (!xdr_string(xdrs, &objp->r_nc_protofmly, RPC_MAXDATASIZE)) {
  209. +               return (FALSE);
  210. +       }
  211. +       if (!xdr_string(xdrs, &objp->r_nc_proto, RPC_MAXDATASIZE)) {
  212. +               return (FALSE);
  213. +       }
  214. +#endif
  215.         return (TRUE);
  216.  }
  217.  
  218. @@ -293,7 +326,11 @@ xdr_rpcb_rmtcallres(xdrs, p)
  219.         bool_t dummy;
  220.         struct r_rpcb_rmtcallres *objp = (struct r_rpcb_rmtcallres *)(void *)p;
  221.  
  222. +#ifdef _WIN32 // CVE-2017-8779
  223. +       if (!xdr_string(xdrs, &objp->addr, RPC_MAXDATASIZE)) {
  224. +#else
  225.         if (!xdr_string(xdrs, &objp->addr, (u_int)~0)) {
  226. +#endif
  227.                 return (FALSE);
  228.         }
  229.         if (!xdr_u_int(xdrs, &objp->results.results_len)) {
  230. @@ -313,6 +350,13 @@ xdr_netbuf(xdrs, objp)
  231.         if (!xdr_u_int32_t(xdrs, (u_int32_t *) &objp->maxlen)) {
  232.                 return (FALSE);
  233.         }
  234. +#ifdef _WIN32 // CVE-2017-8779
  235. +
  236. +       if (objp->maxlen > RPC_MAXDATASIZE) {
  237. +               return (FALSE);
  238. +       }
  239. +
  240. +#endif
  241.         dummy = xdr_bytes(xdrs, (char **)&(objp->buf),
  242.                         (u_int *)&(objp->len), objp->maxlen);
  243.         return (dummy);
  244. diff --git a/libtirpc/src/rpcb_st_xdr.c b/libtirpc/src/rpcb_st_xdr.c
  245. index 6feb70b..5b0b11f 100644
  246. --- a/libtirpc/src/rpcb_st_xdr.c
  247. +++ b/libtirpc/src/rpcb_st_xdr.c
  248. @@ -39,6 +39,9 @@
  249.  
  250.  #include <wintirpc.h>
  251.  #include <rpc/rpc.h>
  252. +#ifdef _WIN32 // CVE-2017-8779
  253. +#include "rpc_com.h"
  254. +#endif
  255.  
  256.  /* Link list of all the stats about getport and getaddr */
  257.  
  258. @@ -60,7 +63,11 @@ xdr_rpcbs_addrlist(xdrs, objp)
  259.             if (!xdr_int(xdrs, &objp->failure)) {
  260.                 return (FALSE);
  261.             }
  262. +#ifdef _WIN32 // CVE-2017-8779
  263. +           if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
  264. +#else
  265.             if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
  266. +#endif
  267.                 return (FALSE);
  268.             }
  269.  
  270. @@ -111,7 +118,11 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
  271.                 IXDR_PUT_INT32(buf, objp->failure);
  272.                 IXDR_PUT_INT32(buf, objp->indirect);
  273.         }
  274. +#ifdef _WIN32 // CVE-2017-8779
  275. +       if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
  276. +#else
  277.         if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
  278. +#endif
  279.                 return (FALSE);
  280.         }
  281.         if (!xdr_pointer(xdrs, (char **)&objp->next,
  282. @@ -149,7 +160,11 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
  283.                 objp->failure = (int)IXDR_GET_INT32(buf);
  284.                 objp->indirect = (int)IXDR_GET_INT32(buf);
  285.         }
  286. +#ifdef _WIN32 // CVE-2017-8779
  287. +       if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
  288. +#else
  289.         if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
  290. +#endif
  291.                 return (FALSE);
  292.         }
  293.         if (!xdr_pointer(xdrs, (char **)&objp->next,
  294. @@ -177,7 +192,11 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
  295.         if (!xdr_int(xdrs, &objp->indirect)) {
  296.                 return (FALSE);
  297.         }
  298. +#ifdef _WIN32 // CVE-2017-8779
  299. +       if (!xdr_string(xdrs, &objp->netid, RPC_MAXDATASIZE)) {
  300. +#else
  301.         if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
  302. +#endif
  303.                 return (FALSE);
  304.         }
  305.         if (!xdr_pointer(xdrs, (char **)&objp->next,
  306. diff --git a/libtirpc/src/xdr.c b/libtirpc/src/xdr.c
  307. index 85396b3..7f098b4 100644
  308. --- a/libtirpc/src/xdr.c
  309. +++ b/libtirpc/src/xdr.c
  310. @@ -44,8 +44,14 @@
  311.  #include <stdlib.h>
  312.  #include <string.h>
  313.  
  314. +#ifdef _WIN32 // CVE-2017-8779
  315. +#include <rpc/rpc.h>
  316. +#endif
  317.  #include <rpc/types.h>
  318.  #include <rpc/xdr.h>
  319. +#ifdef _WIN32 // CVE-2017-8779
  320. +#include <rpc/rpc_com.h>
  321. +#endif
  322.  
  323.  typedef quad_t          longlong_t;     /* ANSI long long type */
  324.  typedef u_quad_t        u_longlong_t;   /* ANSI unsigned long long type */
  325. @@ -55,7 +61,9 @@ typedef u_quad_t        u_longlong_t;   /* ANSI unsigned long long type */
  326.   */
  327.  #define XDR_FALSE      ((long) 0)
  328.  #define XDR_TRUE       ((long) 1)
  329. +#ifndef _WIN32 // CVE-2017-8779
  330.  #define LASTUNSIGNED   ((u_int) 0-1)
  331. +#endif
  332.  
  333.  /*
  334.   * for unit alignment
  335. @@ -533,6 +541,9 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
  336.  {
  337.         char *sp = *cpp;  /* sp is the actual string pointer */
  338.         u_int nodesize;
  339. +#ifdef _WIN32 // CVE-2017-8779
  340. +       bool_t ret, allocated = FALSE;
  341. +#endif
  342.  
  343.         /*
  344.          * first deal with the length since xdr bytes are counted
  345. @@ -556,6 +567,9 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
  346.                 }
  347.                 if (sp == NULL) {
  348.                         *cpp = sp = mem_alloc(nodesize);
  349. +#ifdef _WIN32 // CVE-2017-8779
  350. +                       allocated = TRUE;
  351. +#endif
  352.                 }
  353.                 if (sp == NULL) {
  354.                         //warnx("xdr_bytes: out of memory");
  355. @@ -564,7 +578,18 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
  356.                 /* FALLTHROUGH */
  357.  
  358.         case XDR_ENCODE:
  359. +#ifndef _WIN32 // CVE-2017-8779
  360.                 return (xdr_opaque(xdrs, sp, nodesize));
  361. +#else
  362. +               ret = xdr_opaque(xdrs, sp, nodesize);
  363. +               if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) {
  364. +                       if (allocated == TRUE) {
  365. +                               free(sp);
  366. +                               *cpp = NULL;
  367. +                       }
  368. +               }
  369. +               return (ret);
  370. +#endif
  371.  
  372.         case XDR_FREE:
  373.                 if (sp != NULL) {
  374. @@ -658,6 +683,9 @@ xdr_string(xdrs, cpp, maxsize)
  375.         char *sp = *cpp;  /* sp is the actual string pointer */
  376.         u_int size;
  377.         u_int nodesize;
  378. +#ifdef _WIN32 // CVE-2017-8779
  379. +       bool_t ret, allocated = FALSE;
  380. +#endif
  381.  
  382.         /*
  383.          * first deal with the length since xdr strings are counted-strings
  384. @@ -697,8 +725,15 @@ xdr_string(xdrs, cpp, maxsize)
  385.         switch (xdrs->x_op) {
  386.  
  387.         case XDR_DECODE:
  388. +#ifndef _WIN32 // CVE-2017-8779
  389.                 if (sp == NULL)
  390.                         *cpp = sp = mem_alloc(nodesize);
  391. +#else
  392. +               if (sp == NULL) {
  393. +                       *cpp = sp = mem_alloc(nodesize);
  394. +                       allocated = TRUE;
  395. +               }
  396. +#endif
  397.                 if (sp == NULL) {
  398.                         //warnx("xdr_string: out of memory");
  399.                         return (FALSE);
  400. @@ -707,7 +742,18 @@ xdr_string(xdrs, cpp, maxsize)
  401.                 /* FALLTHROUGH */
  402.  
  403.         case XDR_ENCODE:
  404. +#ifndef _WIN32 // CVE-2017-8779
  405.                 return (xdr_opaque(xdrs, sp, size));
  406. +#else
  407. +               ret = xdr_opaque(xdrs, sp, size);
  408. +               if ((xdrs->x_op == XDR_DECODE) && (ret == FALSE)) {
  409. +                       if (allocated == TRUE) {
  410. +                               free(sp);
  411. +                               *cpp = NULL;
  412. +                       }
  413. +               }
  414. +               return (ret);
  415. +#endif
  416.  
  417.         case XDR_FREE:
  418.                 mem_free(sp, nodesize);
  419. @@ -727,7 +773,11 @@ xdr_wrapstring(xdrs, cpp)
  420.         XDR *xdrs;
  421.         char **cpp;
  422.  {
  423. +#ifdef _WIN32 // CVE-2017-8779
  424. +       return xdr_string(xdrs, cpp, RPC_MAXDATASIZE);
  425. +#else
  426.         return xdr_string(xdrs, cpp, LASTUNSIGNED);
  427. +#endif
  428.  }
  429.  
  430.  /*
  431. --
  432. 2.39.0
  433.  
  434. From d5e85ecf9a8a3616aa0645f16a0b3c568af22023 Mon Sep 17 00:00:00 2001
  435. From: Martin Wege <martin.l.wege@gmail.com>
  436. Date: Sat, 1 Dec 2018 12:15:31 +0100
  437. Subject: [PATCH 4/7] Fix CVE-2018-14621 by backporting its fix
  438.  
  439. Port ReactOS f5f3ff86eafd51bd34665fdfed892a7fc3785879 ("Fix
  440. CVE-2018-14621 by backporting its fix")
  441. Original patch by Pierre Schweitzer <pierre@reactos.org>
  442.  
  443. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  444. ---
  445. libtirpc/src/svc_vc.c | 2 ++
  446.  1 file changed, 2 insertions(+)
  447.  
  448. diff --git a/libtirpc/src/svc_vc.c b/libtirpc/src/svc_vc.c
  449. index 6ea4140..8113500 100644
  450. --- a/libtirpc/src/svc_vc.c
  451. +++ b/libtirpc/src/svc_vc.c
  452. @@ -324,6 +324,7 @@ again:
  453.             &len)) == SOCKET_ERROR) {
  454.                 if (errno == EINTR)
  455.                         goto again;
  456. +#ifndef _WIN32 // CVE-2018-14621
  457.                 /*
  458.                  * Clean out the most idle file descriptor when we're
  459.                  * running out.
  460. @@ -333,6 +334,7 @@ again:
  461.                         __svc_clean_idle(&cleanfds, 0, FALSE);
  462.                         goto again;
  463.                 }
  464. +#endif
  465.                 return (FALSE);
  466.         }
  467.         /*
  468. --
  469. 2.39.0
  470.  
  471. From c5e38fd19404401b28a7696b45ec6fe399d54bb6 Mon Sep 17 00:00:00 2001
  472. From: Martin Wege <martin.l.wege@gmail.com>
  473. Date: Wed, 5 Sep 2018 21:44:47 +0200
  474. Subject: [PATCH 5/7] Fix CVE-2018-14622 by backporting its fix
  475.  
  476. Port ReactOS 000bbe074ed29d1efe39d4d65c81d1c1ead07c93 ("Fix
  477. CVE-2018-14622 by backporting its fix")
  478. Original patch by Pierre Schweitzer <pierre@reactos.org>
  479.  
  480. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  481. ---
  482. libtirpc/src/svc_vc.c | 4 ++++
  483.  1 file changed, 4 insertions(+)
  484.  
  485. diff --git a/libtirpc/src/svc_vc.c b/libtirpc/src/svc_vc.c
  486. index 8113500..53f0df3 100644
  487. --- a/libtirpc/src/svc_vc.c
  488. +++ b/libtirpc/src/svc_vc.c
  489. @@ -342,6 +342,10 @@ again:
  490.          */
  491.  
  492.         newxprt = makefd_xprt(sock, r->sendsize, r->recvsize);
  493. +#ifdef _WIN32 // CVE-2018-14622
  494. +       if (!newxprt)
  495. +               return (FALSE);
  496. +#endif
  497.  
  498.         if (!__rpc_set_netbuf(&newxprt->xp_rtaddr, &addr, len))
  499.                 return (FALSE);
  500. --
  501. 2.39.0
  502.  
  503. From b9cd91cf37013d20f5df235d9450db29e2b6798b Mon Sep 17 00:00:00 2001
  504. From: Martin Wege <martin.l.wege@gmail.com>
  505. Date: Sun, 26 Nov 2017 14:44:26 +0100
  506. Subject: [PATCH 6/7] Match rtime() propotype and implementation
  507.  
  508. Port ReactOS 1feb8e627efd1515097505a675aa4f2e6d8cf15c ("Match rtime()
  509. propotype and implementation")
  510. Original patch by Pierre Schweitzer <pierre@reactos.org>
  511.  
  512. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  513. ---
  514. libtirpc/tirpc/rpc/auth_des.h | 4 ++++
  515.  1 file changed, 4 insertions(+)
  516.  
  517. diff --git a/libtirpc/tirpc/rpc/auth_des.h b/libtirpc/tirpc/rpc/auth_des.h
  518. index f3f9f31..d940010 100644
  519. --- a/libtirpc/tirpc/rpc/auth_des.h
  520. +++ b/libtirpc/tirpc/rpc/auth_des.h
  521. @@ -121,8 +121,12 @@ __END_DECLS
  522.  __BEGIN_DECLS
  523.  extern bool_t  xdr_authdes_cred(XDR *, struct authdes_cred *);
  524.  extern bool_t  xdr_authdes_verf(XDR *, struct authdes_verf *);
  525. +#ifndef _WIN32
  526.  extern int     rtime(dev_t, struct netbuf *, int, struct timeval *,
  527.                     struct timeval *);
  528. +#else
  529. +extern int rtime(struct sockaddr_in *, struct timeval *, struct timeval *);
  530. +#endif
  531.  extern void    kgetnetname(char *);
  532.  extern enum auth_stat _svcauth_des(struct svc_req *, struct rpc_msg *);
  533.  __END_DECLS
  534. --
  535. 2.39.0
  536.  
  537. From 899a85ec2dd9f67d8feb163783020ed4507773c3 Mon Sep 17 00:00:00 2001
  538. From: Roland Mainz <roland.mainz@nrubsig.org>
  539. Date: Wed, 18 Oct 2023 18:19:25 +0200
  540. Subject: [PATCH 7/7] msnfs41client.bash: Add Microsoft symbol servers+document
  541.  heap debug
  542.  
  543. Minor cygwin/devel/msnfs41client.bash update:
  544. - Add Microsoft symbol servers
  545. - Document cdb heap debugging option (not on by default because it
  546. causes nfsd.exe consume lots of memory)
  547.  
  548. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  549. ---
  550. cygwin/devel/msnfs41client.bash | 10 ++++++----
  551.  1 file changed, 6 insertions(+), 4 deletions(-)
  552.  
  553. diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
  554. index ad77034..7afaac2 100644
  555. --- a/cygwin/devel/msnfs41client.bash
  556. +++ b/cygwin/devel/msnfs41client.bash
  557. @@ -110,8 +110,9 @@ function nfsclient_rundeamon
  558.         if false ; then
  559.                 gdb -ex=run --args nfsd_debug -d 0 --noldap --gid 1616 --uid 1616
  560.         else
  561. -               export _NT_ALT_SYMBOL_PATH="$(cygpath -w "$PWD")"
  562. -               cdb -c "g" "$(cygpath -w "$PWD/nfsd_debug.exe")" -d 2 --noldap --gid 1616 --uid 1616
  563. +               export _NT_ALT_SYMBOL_PATH="$(cygpath -w "$PWD");srv*https://msdl.microsoft.com/download/symbols"
  564. +               # use '!gflag +full;g' for heap tests, eats lots of memory
  565. +               cdb -c 'g' "$(cygpath -w "$PWD/nfsd_debug.exe")" -d 0 --noldap #--gid 1616 --uid 1616
  566.         fi
  567.         return $?
  568.  }
  569. @@ -124,8 +125,9 @@ function nfsclient_system_rundeamon
  570.         if false ; then
  571.                 su_system gdb -ex=run --args nfsd_debug -d 0 --noldap --gid 1616 --uid 1616
  572.         else
  573. -               export _NT_ALT_SYMBOL_PATH="$(cygpath -w "$PWD")"
  574. -               su_system cdb -c "g" "$(cygpath -w "$PWD/nfsd_debug.exe")" -d 2 --noldap --gid 1616 --uid 1616
  575. +               export _NT_ALT_SYMBOL_PATH="$(cygpath -w "$PWD");srv*https://msdl.microsoft.com/download/symbols"
  576. +               # use '!gflag +full;g' for heap tests, eats lots of memory
  577. +               su_system cdb -c 'g' "$(cygpath -w "$PWD/nfsd_debug.exe")" -d 0 --noldap #--gid 1616 --uid 1616
  578.         fi
  579.         return $?
  580.  }
  581. --
  582. 2.39.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