pastebin - collaborative debugging tool
rovema.kpaste.net RSS


CITI ms-nfsv41-client patch for VC19
Posted by Anonymous on Mon 4th Sep 2023 17:59
raw | new post

  1. diff --git a/daemon/from_kernel.h b/daemon/from_kernel.h
  2. index c14c398..221ee3b 100644
  3. --- a/daemon/from_kernel.h
  4. +++ b/daemon/from_kernel.h
  5. @@ -152,6 +152,7 @@ typedef struct _FILE_BOTH_DIR_INFORMATION {
  6.      WCHAR FileName[1];
  7.  } FILE_BOTH_DIR_INFORMATION, *PFILE_BOTH_DIR_INFORMATION;
  8.  
  9. +#ifdef FIXME_OLD_DDK
  10.  typedef struct _FILE_FULL_DIR_INFO {
  11.      ULONG NextEntryOffset;
  12.      ULONG FileIndex;
  13. @@ -166,6 +167,7 @@ typedef struct _FILE_FULL_DIR_INFO {
  14.      ULONG EaSize;
  15.      WCHAR FileName[1];
  16.  } FILE_FULL_DIR_INFO, *PFILE_FULL_DIR_INFO;
  17. +#endif /* FIXME_OLD_DDK */
  18.  
  19.  typedef struct _FILE_ID_FULL_DIR_INFO {
  20.      ULONG NextEntryOffset;
  21. diff --git a/daemon/idmap.c b/daemon/idmap.c
  22. index f38ec71..0dfa8ef 100644
  23. --- a/daemon/idmap.c
  24. +++ b/daemon/idmap.c
  25. @@ -275,7 +275,7 @@ static int config_find_option(
  26.  
  27.      /* find the config_option by key */
  28.      for (i = 0; i < count; i++) {
  29. -        if (stricmp(pair->key, g_options[i].key) == 0) {
  30. +        if (_stricmp(pair->key, g_options[i].key) == 0) {
  31.              *option = &g_options[i];
  32.              status = NO_ERROR;
  33.              break;
  34. diff --git a/daemon/nfs41_compound.c b/daemon/nfs41_compound.c
  35. index f7e3d65..217900a 100644
  36. --- a/daemon/nfs41_compound.c
  37. +++ b/daemon/nfs41_compound.c
  38. @@ -362,7 +362,7 @@ retry:
  39.                  saved_sec_flavor = session->client->rpc->sec_flavor;
  40.                  saved_auth = session->client->rpc->rpc->cl_auth;
  41.                  if (op == OP_LOOKUP || op == OP_OPEN) {
  42. -                    const nfs41_component *name;
  43. +                    const nfs41_component *name = NULL;
  44.                      nfs41_path_fh tmp = { 0 };                  
  45.                      nfs41_getfh_res *getfh;
  46.                      nfs41_lookup_args *largs;
  47. diff --git a/dirs b/dirs
  48. index ae5014a..b50059f 100644
  49. --- a/dirs
  50. +++ b/dirs
  51. @@ -1 +1 @@
  52. -DIRS = dll sys mount install
  53. +DIRS = dll sys mount install libtirpc daemon
  54. diff --git a/install/sources b/install/sources
  55. index d5bc6c2..71c5e6b 100644
  56. --- a/install/sources
  57. +++ b/install/sources
  58. @@ -1,15 +1,15 @@
  59. -TARGETTYPE=PROGRAM
  60. -TARGETNAME=nfs_install
  61. -SOURCES=nfs_install.c nfsreginst.c
  62. -UMTYPE=console
  63. -USE_MSVCRT=1
  64. -INCLUDES=..\sys
  65. -
  66. -!IF 0
  67. -/W3 is default level
  68. -bump to /Wall, but suppress warnings generated by system includes,
  69. -as well as the following warnings:
  70. -4100 - unused function call arguments (we have lots of stubs)
  71. -4127 - constant conditional (I like to use if(0) or if(1))
  72. -!ENDIF
  73. -MSC_WARNING_LEVEL=/Wall /wd4668 /wd4619 /wd4820 /wd4255 /wd4100 /wd4127 /wd4201 /wd4214 /wd4711
  74. +TARGETTYPE=PROGRAM
  75. +TARGETNAME=nfs_install
  76. +SOURCES=nfs_install.c nfsreginst.c
  77. +UMTYPE=console
  78. +USE_MSVCRT=1
  79. +INCLUDES=..\sys
  80. +
  81. +!IF 0
  82. +/W3 is default level
  83. +bump to /Wall, but suppress warnings generated by system includes,
  84. +as well as the following warnings:
  85. +4100 - unused function call arguments (we have lots of stubs)
  86. +4127 - constant conditional (I like to use if(0) or if(1))
  87. +!ENDIF
  88. +MSC_WARNING_LEVEL=/Wall /wd4668 /wd4619 /wd4820 /wd4255 /wd4100 /wd4127 /wd4201 /wd4214 /wd4711
  89. diff --git a/libtirpc/src/auth_unix.c b/libtirpc/src/auth_unix.c
  90. index 4757aaa..ca8c908 100644
  91. --- a/libtirpc/src/auth_unix.c
  92. +++ b/libtirpc/src/auth_unix.c
  93. @@ -375,8 +375,14 @@ marshal_new_auth(auth)
  94.         XDR_DESTROY(xdrs);
  95.  }
  96.  
  97. -static bool_t
  98. -authunix_wrap(AUTH *auth, XDR *xdrs, xdrproc_t func, caddr_t args, u_int seq)
  99. +static int
  100. +authunix_wrap(struct __auth *auth, XDR *xdrs, xdrproc_t func, caddr_t args)
  101. +{
  102. +    return ((*func)(xdrs, args));
  103. +}
  104. +
  105. +static int
  106. +authunix_unwrap(struct __auth *auth, XDR *xdrs, xdrproc_t func, caddr_t args, u_int seq)
  107.  {
  108.      return ((*func)(xdrs, args));
  109.  }
  110. @@ -397,7 +403,7 @@ authunix_ops()
  111.                 ops.ah_refresh = authunix_refresh;
  112.                 ops.ah_destroy = authunix_destroy;
  113.                 ops.ah_wrap = authunix_wrap;
  114. -               ops.ah_unwrap = authunix_wrap;
  115. +               ops.ah_unwrap = authunix_unwrap;
  116.         }
  117.         mutex_unlock(&ops_lock);
  118.         return (&ops);
  119. diff --git a/libtirpc/src/clnt_dg.c b/libtirpc/src/clnt_dg.c
  120. index a567b22..1ece8ad 100644
  121. --- a/libtirpc/src/clnt_dg.c
  122. +++ b/libtirpc/src/clnt_dg.c
  123. @@ -55,6 +55,10 @@
  124.  //#include <err.h>
  125.  #include "rpc_com.h"
  126.  
  127. +#ifdef _WIN32
  128. +#undef IP_RECVERR
  129. +#endif
  130. +
  131.  #ifdef IP_RECVERR
  132.  #include <asm/types.h>
  133.  #include <linux/errqueue.h>
  134. diff --git a/libtirpc/src/sources b/libtirpc/src/sources
  135. index 80a6ae2..87249b5 100644
  136. --- a/libtirpc/src/sources
  137. +++ b/libtirpc/src/sources
  138. @@ -81,7 +81,7 @@ DLLBASE=0x1010000
  139.  #USE_NTDLL=1
  140.  #USE_MSVCRT=1
  141.  USE_LIBCMT=1
  142. -NET_C_DEFINES=-DUNICODE -DINET6 -D_WIN32 -DPORTMAP
  143. +NET_C_DEFINES=-DUNICODE -DFD_SETSIZE=128 -DINET6 -DNO_CB_4_KRB5P -DPORTMAP
  144.  
  145.  INCLUDES=..\sys; \
  146.         ..\tirpc; \
  147. @@ -90,6 +90,7 @@ INCLUDES=..\sys; \
  148.  TARGETLIBS=$(SDK_LIB_PATH)\user32.lib \
  149.         $(SDK_LIB_PATH)\kernel32.lib \
  150.         $(SDK_LIB_PATH)\ws2_32.lib \
  151. +       $(SDK_LIB_PATH)\secur32.lib \
  152.         $(SDK_LIB_PATH)\Advapi32.lib
  153.  
  154.  
  155. diff --git a/libtirpc/src/xdr_rec.c b/libtirpc/src/xdr_rec.c
  156. index cd8e987..567f574 100644
  157. --- a/libtirpc/src/xdr_rec.c
  158. +++ b/libtirpc/src/xdr_rec.c
  159. @@ -421,7 +421,7 @@ xdrrec_getoutbase(xdrs)
  160.         switch (xdrs->x_op) {
  161.  
  162.         case XDR_ENCODE:
  163. -        buf = rstrm->out_base;
  164. +        buf = (int32_t *)rstrm->out_base;
  165.                 break;
  166.  
  167.         case XDR_DECODE:
  168. diff --git a/libtirpc/tirpc/wintirpc.h b/libtirpc/tirpc/wintirpc.h
  169. index a2ed188..2789e0a 100644
  170. --- a/libtirpc/tirpc/wintirpc.h
  171. +++ b/libtirpc/tirpc/wintirpc.h
  172. @@ -45,7 +45,7 @@
  173.  #include <process.h>
  174.  #include <basetsd.h>
  175.  
  176. -#define snprintf _snprintf
  177. +//#define snprintf _snprintf
  178.  //#define vsnprintf _vsnprintf
  179.  #define strcasecmp _stricmp
  180.  //#define strdup _strdup

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