- From 66f649489aecc6eb594030c88c2d64d6de397afc Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 12 Dec 2024 11:38:56 +0100
- Subject: [PATCH 1/4] libtirpc: Backport "Update declarations to allow compile
- with gcc-15"
- Backport of libtirpc commit "Update declarations to allow compile
- with gcc-15".
- ---- snip ----
- From d473f1e1f6ba80bfaee4daa058da159305167323 Mon Sep 17 00:00:00 2001
- From: Rudi Heitbaum <rudi@heitbaum.com>
- Date: Thu, 12 Dec 2024 04:16:02 -0500
- Subject: [PATCH] Update declarations to allow compile with gcc-15
- This patch fixes some of the compile errors with gcc 15-20241117.
- In addition the follow declarations need to be fixed:
- sed -n 75,77p libtirpc-1.3.6/src/key_call.c
- cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0;
- cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0;
- des_block *(*__key_gendes_LOCAL)() = 0;
- Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
- Signed-off-by: Steve Dickson <steved@redhat.com>
- ---- snip ----
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- libtirpc/src/auth_none.c | 2 +-
- libtirpc/src/getpublickey.c | 2 +-
- libtirpc/src/svc_auth_none.c | 4 ++--
- 3 files changed, 4 insertions(+), 4 deletions(-)
- diff --git a/libtirpc/src/auth_none.c b/libtirpc/src/auth_none.c
- index b528b55..4c2e9b3 100644
- --- a/libtirpc/src/auth_none.c
- +++ b/libtirpc/src/auth_none.c
- @@ -86,7 +86,7 @@ static bool_t authnone_validate (AUTH *, struct opaque_auth *, u_int);
- static bool_t authnone_refresh (AUTH *, void *);
- static void authnone_destroy (AUTH *);
- -extern bool_t xdr_opaque_auth();
- +extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
- static struct auth_ops *authnone_ops();
- diff --git a/libtirpc/src/getpublickey.c b/libtirpc/src/getpublickey.c
- index 0dee063..018eee7 100644
- --- a/libtirpc/src/getpublickey.c
- +++ b/libtirpc/src/getpublickey.c
- @@ -53,7 +53,7 @@
- /*
- * Hack to let ypserv/rpc.nisd use AUTH_DES.
- */
- -int (*__getpublickey_LOCAL)() = 0;
- +int (*__getpublickey_LOCAL)(const char *, char *) = 0;
- /*
- * Get somebody's public key
- diff --git a/libtirpc/src/svc_auth_none.c b/libtirpc/src/svc_auth_none.c
- index 18f4e16..60bd9aa 100644
- --- a/libtirpc/src/svc_auth_none.c
- +++ b/libtirpc/src/svc_auth_none.c
- @@ -38,8 +38,8 @@
- #include <wintirpc.h>
- #include <rpc/rpc.h>
- -//static bool_t svcauth_none_destroy();
- -//static bool_t svcauth_none_wrap();
- +//static bool_t svcauth_none_destroy(SVCAUTH *);
- +//static bool_t svcauth_none_wrap(SVCAUTH *, XDR *, bool_t (*)(XDR *, ...), char *);
- static bool_t
- svcauth_none_destroy(SVCAUTH *auth)
- --
- 2.45.1
- From b73aff7f55b3efdfb36c277cd21651ffa551e12b Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 12 Dec 2024 11:47:34 +0100
- Subject: [PATCH 2/4] cygwin: README.txt VS2022 build instructions for v143
- platform toolset
- Build instructions in cygwin/README.txt for Visual Studio 2022 should
- include instructions how to "retarget" the solution to use the
- correct platform toolset ("v143" for VS2022, "v142" for VS2019).
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/README.txt | 3 +++
- 1 file changed, 3 insertions(+)
- diff --git a/cygwin/README.txt b/cygwin/README.txt
- index ffce8ad..531b97e 100644
- --- a/cygwin/README.txt
- +++ b/cygwin/README.txt
- @@ -49,6 +49,9 @@ make bintarball
- export PATH="/cygdrive/c/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/:$PATH"
- git clone https://github.com/kofemann/ms-nfs41-client.git
- cd ms-nfs41-client
- +# "retarget" VS platform toolset to "v143"
- +# ("v142" should remain the default when comitting)
- +sed -i -E 's/<PlatformToolset>v142<\/PlatformToolset>/<PlatformToolset>v143<\/PlatformToolset>/g' $(find 'build.vc19' -name \*.vcxproj)
- cd cygwin
- make build64
- make installdest64
- --
- 2.45.1
- From b4e2965b442b9622c90097379e2b0fa91e981809 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 12 Dec 2024 13:25:29 +0100
- Subject: [PATCH 3/4] cygwin,daemon: releasebuild msnfs41client
- sys_run_daemon cannot write log files and fails quietly
- Release build of nfsd.exe started via $ msnfs41client sys_run_daemon #
- cannot write log files and fails, without returning any error
- messages to stderr.
- Fix is to give user "SYSTEM" write rights in the cwd where nfsd.exe is
- started, and |open_log_files()| will print an error message if it cannot
- open a log gile.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/devel/msnfs41client.bash | 7 +++++++
- daemon/daemon_debug.c | 19 +++++++++++++++++--
- 2 files changed, 24 insertions(+), 2 deletions(-)
- diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
- index 4337a02..6c9a401 100755
- --- a/cygwin/devel/msnfs41client.bash
- +++ b/cygwin/devel/msnfs41client.bash
- @@ -516,6 +516,13 @@ function nfsclient_system_rundeamon
- # gets printed correctly on a terminal
- chcp.com 65001
- + # make sure nfsd running as user "SYSTEM" can write
- + # its log files to CWD
- + # We explicitly use the SID ("S-1-5-18") for user "SYSTEM",
- + # because the username can be localised, e.g.
- + # $'Syst\xc3\xa8me' for French Windows
- + icacls "$(cygpath -w "$PWD")" /grant '*S-1-5-18:(F)'
- +
- typeset -a nfsd_args=(
- 'nfsd.exe'
- '-debug'
- diff --git a/daemon/daemon_debug.c b/daemon/daemon_debug.c
- index 22007ac..3b92728 100644
- --- a/daemon/daemon_debug.c
- +++ b/daemon/daemon_debug.c
- @@ -24,6 +24,7 @@
- #include <stdio.h>
- #include <sddl.h>
- #include <lmcons.h>
- +#include <direct.h> /* for |_getcwd()| */
- #include "daemon_debug.h"
- #include "from_kernel.h"
- @@ -54,16 +55,30 @@ void open_log_files()
- elog_file = fopen(efile, mode);
- if (elog_file == NULL) {
- + char *cwd;
- lasterr = GetLastError();
- + cwd = _getcwd(NULL, 1);
- + (void)fprintf(stderr,
- + "open_log_files: "
- + "Cannot open log file '%s\\%s', lasterr=%d\n",
- + cwd, efile, (int)lasterr);
- ReportStatusToSCMgr(SERVICE_STOPPED, lasterr, 0);
- - exit(lasterr);
- + free(cwd);
- + exit(1);
- }
- dlog_file = fopen(dfile, mode);
- if (dlog_file == NULL) {
- + char *cwd;
- lasterr = GetLastError();
- + cwd = _getcwd(NULL, 1);
- + (void)fprintf(stderr,
- + "open_log_files: "
- + "Cannot open log file '%s\\%s', lasterr=%d\n",
- + cwd, dfile, (int)lasterr);
- ReportStatusToSCMgr(SERVICE_STOPPED, lasterr, 0);
- - exit(lasterr);
- + free(cwd);
- + exit(1);
- }
- }
- --
- 2.45.1
- From c467f87fb9d4f3984d94bec3f23329d44f9fb9da Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 12 Dec 2024 13:29:05 +0100
- Subject: [PATCH 4/4] sys: nfs41_driver.sys build with |NDEBUG| should print
- less debug messages
- nfs41_driver.sys build with |NDEBUG| should print less debug messages
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41sys_debug.h | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
- diff --git a/sys/nfs41sys_debug.h b/sys/nfs41sys_debug.h
- index d199ddf..29bb339 100644
- --- a/sys/nfs41sys_debug.h
- +++ b/sys/nfs41sys_debug.h
- @@ -64,7 +64,11 @@ void print_debug_header(PRX_CONTEXT RxContext);
- #define PTR2PTRDIFF_T(p) (((char *)(p))-((char *)0))
- #define PsGetCurrentProcessShortDebugId() ((int)PTR2PTRDIFF_T(PsGetCurrentProcessId()))
- -
- +#ifdef NDEBUG
- +#define DbgEn()
- +#define DbgEx()
- +#define DbgR()
- +#else
- #define DbgEn() DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, \
- "--> [%s] [%04x] %s\n", _DRIVER_NAME_, PsGetCurrentProcessShortDebugId(), \
- __func__); __try {
- @@ -83,6 +87,7 @@ void print_debug_header(PRX_CONTEXT RxContext);
- exc_status = GetExceptionCode() ; \
- DbgP("Exception encountered with value = 0x%lx\n", (long)exc_status); \
- }
- +#endif /* NDEBUG */
- /* These are for ToasterDebugPrint */
- --
- 2.45.1
msnfs41client: Patches for libtirpc gcc15 build, release build fixes, VS2022 build+misc, 2024-12-12
Posted by Anonymous on Thu 12th Dec 2024 14:20
raw | new post
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.