- From a6aa6f0368eb7ce44cf22229bd8e638f010417c9 Mon Sep 17 00:00:00 2001
- From: Josh Hurst <joshhurst@gmail.com>
- Date: Thu, 19 Sep 2024 11:42:05 +0200
- Subject: [PATCH 1/6] daemon: Fix typo when quoting impersonated group name
- Fix typo (missing "'") when quoting impersonated group name
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/daemon_debug.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/daemon/daemon_debug.c b/daemon/daemon_debug.c
- index cda0df1..f7e935c 100644
- --- a/daemon/daemon_debug.c
- +++ b/daemon/daemon_debug.c
- @@ -125,7 +125,7 @@ void dprintf_out(LPCSTR format, ...)
- in_dprintf_out = false;
- }
- - (void)fprintf(dlog_file, "%04x/%s='%s'/%s' ",
- + (void)fprintf(dlog_file, "%04x/%s='%s'/'%s' ",
- (int)GetCurrentThreadId(),
- tok_src, username, groupname);
- --
- 2.45.1
- From f3cebbd10c32257fffd6542a711aa53100442cb0 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 19 Sep 2024 12:35:17 +0200
- Subject: [PATCH 2/6] cygwin_idmapper.ksh,daemon: Fix typo in idmapper code
- which causes confusion
- Typo in idmapper code causes confusion, because manually added
- account with correctly spelled variable names are not found.
- Fix: s/localaccoutname/localaccountname/
- Reported-by: Martin Wege <martin.l.wege@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin_idmapper.ksh | 16 ++++++++--------
- daemon/idmap_cygwin.c | 10 +++++-----
- 2 files changed, 13 insertions(+), 13 deletions(-)
- diff --git a/cygwin_idmapper.ksh b/cygwin_idmapper.ksh
- index bcbc871..71a9a1a 100644
- --- a/cygwin_idmapper.ksh
- +++ b/cygwin_idmapper.ksh
- @@ -45,42 +45,42 @@ typeset -r -A localised_groupnames=(['None']="${stdout%%:*}")
- compound -A localusers=(
- ["roland_mainz"]=(
- - localaccoutname='roland_mainz'
- + localaccountname='roland_mainz'
- localuid=197608
- localgid=197121
- )
- ["siegfried_wulsch"]=(
- - localaccoutname='siegfried_wulsch'
- + localaccountname='siegfried_wulsch'
- localuid=197609
- localgid=197121
- )
- ["${localised_usernames['SYSTEM']}"]=(
- - localaccoutname="${localised_usernames['SYSTEM']}"
- + localaccountname="${localised_usernames['SYSTEM']}"
- localuid=18
- localgid=18
- )
- ["SYSTEM"]=(
- - localaccoutname="${localised_usernames['SYSTEM']}"
- + localaccountname="${localised_usernames['SYSTEM']}"
- localuid=18
- localgid=18
- )
- ["rmainz"]=(
- - localaccoutname='rmainz'
- + localaccountname='rmainz'
- localuid=1616
- localgid=1616
- )
- ["swulsch"]=(
- - localaccoutname='swulsch'
- + localaccountname='swulsch'
- localuid=1818
- localgid=1818
- )
- ["root"]=(
- - localaccoutname='root'
- + localaccountname='root'
- localuid=0
- localgid=0
- )
- ["nobody"]=(
- - localaccoutname='nobody'
- + localaccountname='nobody'
- localuid=65534
- localgid=65534
- )
- diff --git a/daemon/idmap_cygwin.c b/daemon/idmap_cygwin.c
- index ec60142..9f7af99 100644
- --- a/daemon/idmap_cygwin.c
- +++ b/daemon/idmap_cygwin.c
- @@ -63,7 +63,7 @@ int cygwin_getent_passwd(const char *name, char *res_loginname, uid_t *res_uid,
- int i = 0;
- cpv_name_val cnv[64] = { 0 };
- cpv_name_val *cnv_cur = NULL;
- - const char *localaccoutname = NULL;
- + const char *localaccountname = NULL;
- DPRINTF(CYGWINIDLVL,
- ("--> cygwin_getent_passwd(name='%s')\n",
- @@ -129,8 +129,8 @@ int cygwin_getent_passwd(const char *name, char *res_loginname, uid_t *res_uid,
- for (i=0 ; i < numcnv ; i++) {
- cnv_cur = &cnv[i];
- - if (!strcmp("localaccoutname", cnv_cur->cpv_name)) {
- - localaccoutname = cnv_cur->cpv_value;
- + if (!strcmp("localaccountname", cnv_cur->cpv_name)) {
- + localaccountname = cnv_cur->cpv_value;
- }
- else if (!strcmp("localuid", cnv_cur->cpv_name)) {
- errno = 0;
- @@ -146,11 +146,11 @@ int cygwin_getent_passwd(const char *name, char *res_loginname, uid_t *res_uid,
- }
- }
- - if (!localaccoutname)
- + if (!localaccountname)
- goto fail;
- if (res_loginname)
- - (void)strcpy_s(res_loginname, VAL_LEN, localaccoutname);
- + (void)strcpy_s(res_loginname, VAL_LEN, localaccountname);
- *res_uid = uid;
- *res_gid = gid;
- res = 0;
- --
- 2.45.1
- From c969b0f51404ab936a031fb368223d7103bd2289 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 19 Sep 2024 12:48:48 +0200
- Subject: [PATCH 3/6] cygwin_idmapper.ksh: Add manual entry for group "Kein" to
- handle German Windows
- Add manual "Kein" entry for German localised Windows group "None"
- to handle NFSv4 servers which have been configured to use that
- group name.
- Reported-by: Martin Wege <martin.l.wege@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin_idmapper.ksh | 5 +++++
- 1 file changed, 5 insertions(+)
- diff --git a/cygwin_idmapper.ksh b/cygwin_idmapper.ksh
- index 71a9a1a..930a32e 100644
- --- a/cygwin_idmapper.ksh
- +++ b/cygwin_idmapper.ksh
- @@ -95,6 +95,11 @@ compound -A localgroups=(
- localgroupname="${localised_groupnames['None']}"
- localgid=197121
- )
- + # German Windows localised group name for "None"
- + ["Kein"]=(
- + localgroupname="${localised_groupnames['None']}"
- + localgid=197121
- + )
- ["rmainz"]=(
- localgroupname='rmainz'
- localgid=1616
- --
- 2.45.1
- From a092659209b2bd3b42da3a4229d076f34e8d2dd0 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 19 Sep 2024 12:52:03 +0200
- Subject: [PATCH 4/6] cygwin: Add "Windows Server 2019" to the list of
- supported Windows versions
- Add "Windows Server 2019" to the list of supported Windows versions in
- README.bintarball.txt.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/README.bintarball.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
- diff --git a/cygwin/README.bintarball.txt b/cygwin/README.bintarball.txt
- index e64fdc9..f5d4438 100644
- --- a/cygwin/README.bintarball.txt
- +++ b/cygwin/README.bintarball.txt
- @@ -10,7 +10,7 @@
- #
- # 1. What is this ?
- #
- -NFSv4.1 client and filesystem driver for Windows 10/11
- +NFSv4.1 filesystem driver for Windows 10/11&Windows Server 2019
- #
- @@ -85,7 +85,7 @@ NFSv4.1 client and filesystem driver for Windows 10/11
- #
- # 3. Requirements:
- #
- -- Windows 10 (32bit or 64bit) or Windows 11
- +- Windows 10 (32bit or 64bit), Windows 11 or Windows Server 2019
- - Cygwin:
- - Cygwin versions:
- - 64bit: >= 3.5.3 (or 3.6.x-devel)
- --
- 2.45.1
- From bbecf39cb10028367407f8bcad410941bf8957ff Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 19 Sep 2024 13:35:35 +0200
- Subject: [PATCH 5/6] dll: Remove invalid "SECTIONS" from nfs41_np.def
- Remove invalid "SECTIONS" from nfs41_np.def, VS19 does not
- understand it
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- dll/nfs41_np.def | 1 -
- 1 file changed, 1 deletion(-)
- diff --git a/dll/nfs41_np.def b/dll/nfs41_np.def
- index 31cd2d0..273f5f6 100644
- --- a/dll/nfs41_np.def
- +++ b/dll/nfs41_np.def
- @@ -1,4 +1,3 @@
- -SECTIONS .NFS41_NP READ WRITE SHARED
- EXPORTS
- NPGetCaps @13
- --
- 2.45.1
- From ea645bf200f0285fb29b326e8d2419a5b55fb55f Mon Sep 17 00:00:00 2001
- From: Dan Shelton <dan.f.shelton@gmail.com>
- Date: Thu, 19 Sep 2024 14:23:18 +0200
- Subject: [PATCH 6/6] daemon,dll,libtirpc: Fix Windows clang build errors for
- ReactOS compatibility
- Fix Windows clang build errors for ReactOS compatibility.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/callback_server.c | 3 ++-
- daemon/daemon_debug.h | 2 +-
- daemon/nfs41_callback.h | 2 +-
- dll/nfs41_np.c | 4 ++--
- dll/options.h | 3 ++-
- libtirpc/src/asprintf.c | 6 +++++-
- libtirpc/src/auth_sspi.c | 12 ++++++++----
- libtirpc/src/clnt_vc.c | 2 +-
- libtirpc/src/svc_vc.c | 2 +-
- 9 files changed, 23 insertions(+), 13 deletions(-)
- diff --git a/daemon/callback_server.c b/daemon/callback_server.c
- index 8d898d4..2673add 100644
- --- a/daemon/callback_server.c
- +++ b/daemon/callback_server.c
- @@ -508,8 +508,9 @@ out:
- res ? res->resarray_count : 0));
- }
- -int nfs41_handle_callback(void *rpc_clnt, void *cb, struct cb_compound_res **reply)
- +int nfs41_handle_callback(void *rpc_clnt, void *cb, void **arg_reply)
- {
- + struct cb_compound_res **reply = (struct cb_compound_res **)arg_reply;
- nfs41_rpc_clnt *rpc = (nfs41_rpc_clnt *)rpc_clnt;
- cb_req *request = (cb_req *)cb;
- uint32_t status = 0;
- diff --git a/daemon/daemon_debug.h b/daemon/daemon_debug.h
- index c6f48a9..969bf80 100644
- --- a/daemon/daemon_debug.h
- +++ b/daemon/daemon_debug.h
- @@ -152,7 +152,7 @@ void print_sr_status_flags(int level, int flags);
- void open_log_files();
- void close_log_files();
- const char* secflavorop2name(DWORD sec_flavor);
- -void print_nfs41_file_info(const char *label, void *vinfo);
- +void print_nfs41_file_info(const char *label, const void *vinfo);
- /* pnfs_debug.c */
- enum pnfs_status;
- diff --git a/daemon/nfs41_callback.h b/daemon/nfs41_callback.h
- index 8e5190c..fddaa1a 100644
- --- a/daemon/nfs41_callback.h
- +++ b/daemon/nfs41_callback.h
- @@ -48,7 +48,7 @@ enum nfs41_callback_op {
- OP_CB_ILLEGAL = 10044
- };
- -int nfs41_handle_callback(void *, void *, void *);
- +int nfs41_handle_callback(void *rpc_clnt, void *cb, void **arg_reply);
- /* OP_CB_LAYOUTRECALL */
- struct cb_recall_file {
- diff --git a/dll/nfs41_np.c b/dll/nfs41_np.c
- index 5d2c8eb..5a89134 100644
- --- a/dll/nfs41_np.c
- +++ b/dll/nfs41_np.c
- @@ -269,7 +269,7 @@ static DWORD StoreConnectionInfo(
- #endif /* NFS41_DRIVER_USE_AUTHENTICATIONID_FOR_MOUNT_NAMESPACE */
- status = OpenSharedMemory(&hMutex, &hMemory,
- - &(PVOID)pSharedMemory);
- + (PVOID *)&pSharedMemory);
- if (status)
- goto out;
- @@ -327,7 +327,7 @@ static DWORD StoreConnectionInfo(
- // TODO: copy mount options -cbodley
- out_close:
- - CloseSharedMemory(&hMutex, &hMemory, &(PVOID)pSharedMemory);
- + CloseSharedMemory(&hMutex, &hMemory, (PVOID *)&pSharedMemory);
- out:
- DbgP((L"<-- StoreConnectionInfo returns %d\n", (int)status));
- diff --git a/dll/options.h b/dll/options.h
- index b425458..44e300d 100644
- --- a/dll/options.h
- +++ b/dll/options.h
- @@ -24,7 +24,8 @@
- #include "nfs41_driver.h"
- -#define MOUNT_OPTION_BUFFER_SECRET ('n4')
- +/* Secret is ASCII "n4" */
- +#define MOUNT_OPTION_BUFFER_SECRET (('n' << 8) | '4')
- /* MOUNT_OPTION_BUFFER
- * The mount options buffer received by NPAddConnection3
- diff --git a/libtirpc/src/asprintf.c b/libtirpc/src/asprintf.c
- index c5daed6..490a795 100644
- --- a/libtirpc/src/asprintf.c
- +++ b/libtirpc/src/asprintf.c
- @@ -17,9 +17,13 @@
- */
- //extern int vsnprintf();
- +#ifdef _WIN32
- #include <wintirpc.h>
- -#include <stdio.h>
- +#include <stdarg.h>
- +#else
- #include <varargs.h>
- +#endif /* _WIN32 */
- +#include <stdio.h>
- /* Include vasprintf() if not on your OS. */
- #ifndef HAVE_VASPRINTF
- diff --git a/libtirpc/src/auth_sspi.c b/libtirpc/src/auth_sspi.c
- index 8e84444..309fc32 100644
- --- a/libtirpc/src/auth_sspi.c
- +++ b/libtirpc/src/auth_sspi.c
- @@ -653,9 +653,10 @@ authsspi_unwrap(AUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr, u_in
- gd->sec->svc, seq));
- }
- -uint32_t sspi_get_mic(PCtxtHandle ctx, u_int qop, u_int seq,
- +uint32_t sspi_get_mic(void *arg_ctx, u_int qop, u_int seq,
- sspi_buffer_desc *bufin, sspi_buffer_desc *bufout)
- {
- + PCtxtHandle ctx = arg_ctx;
- uint32_t maj_stat;
- SecPkgContext_Sizes ContextSizes;
- SecBufferDesc desc;
- @@ -691,9 +692,10 @@ uint32_t sspi_get_mic(PCtxtHandle ctx, u_int qop, u_int seq,
- return maj_stat;
- }
- -uint32_t sspi_verify_mic(PCtxtHandle ctx, u_int seq, sspi_buffer_desc *bufin,
- +uint32_t sspi_verify_mic(void *arg_ctx, u_int seq, sspi_buffer_desc *bufin,
- sspi_buffer_desc *bufout, unsigned long *qop_state)
- {
- + PCtxtHandle ctx = arg_ctx;
- SecBufferDesc desc;
- SecBuffer sec_tkn[2];
- @@ -735,9 +737,10 @@ uint32_t sspi_import_name(sspi_buffer_desc *name_in, sspi_name_t *name_out)
- return SEC_E_OK;
- }
- -uint32_t sspi_wrap(PCtxtHandle ctx, u_int seq, sspi_buffer_desc *bufin,
- +uint32_t sspi_wrap(void *arg_ctx, u_int seq, sspi_buffer_desc *bufin,
- sspi_buffer_desc *bufout, u_int *conf_state)
- {
- + PCtxtHandle ctx = arg_ctx;
- uint32_t maj_stat;
- SecBufferDesc BuffDesc;
- SecBuffer SecBuff[3];
- @@ -788,10 +791,11 @@ out:
- return maj_stat;
- }
- -uint32_t sspi_unwrap(PCtxtHandle ctx, u_int seq, sspi_buffer_desc *bufin,
- +uint32_t sspi_unwrap(void *arg_ctx, u_int seq, sspi_buffer_desc *bufin,
- sspi_buffer_desc *bufout, u_int *conf_state,
- unsigned long *qop_state)
- {
- + PCtxtHandle ctx = arg_ctx;
- uint32_t maj_stat;
- SecBufferDesc BuffDesc;
- SecBuffer SecBuff[2];
- diff --git a/libtirpc/src/clnt_vc.c b/libtirpc/src/clnt_vc.c
- index 19165d9..8d86a5c 100644
- --- a/libtirpc/src/clnt_vc.c
- +++ b/libtirpc/src/clnt_vc.c
- @@ -132,7 +132,7 @@ static void clnt_vc_destroy(CLIENT *);
- static struct clnt_ops *clnt_vc_ops(void);
- static bool_t time_not_ok(struct timeval *);
- static int read_vc(void *, void *, int);
- -static int write_vc(void *, void *, int);
- +static int write_vc(void *, char *, int);
- struct ct_data {
- int ct_fd; /* connection's fd */
- diff --git a/libtirpc/src/svc_vc.c b/libtirpc/src/svc_vc.c
- index 2d2b429..229844f 100644
- --- a/libtirpc/src/svc_vc.c
- +++ b/libtirpc/src/svc_vc.c
- @@ -75,7 +75,7 @@ static enum xprt_stat rendezvous_stat(SVCXPRT *);
- static void svc_vc_destroy(SVCXPRT *);
- static void __svc_vc_dodestroy (SVCXPRT *);
- static int read_vc(void *, void *, int);
- -static int write_vc(void *, void *, int);
- +static int write_vc(void *, char *, int);
- static enum xprt_stat svc_vc_stat(SVCXPRT *);
- static bool_t svc_vc_recv(SVCXPRT *, struct rpc_msg *);
- static bool_t svc_vc_getargs(SVCXPRT *, xdrproc_t, void *);
- --
- 2.45.1
msnfs41client: WindowsServer2019 support, more idmapper fixes, clang build fixes+misc, 2024-09-19
Posted by Anonymous on Thu 19th Sep 2024 16:16
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.