- From 6fd67cc4a5f00630f6dd2c807f78699183c7e08f Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Tue, 10 Jun 2025 17:33:04 +0200
- Subject: [PATCH 1/3] daemon: newgrp support should not try to set owner_group
- after file creation for sec=none
- newgrp support should not try to set owner_group after file creation for
- sec=none, because sec=none does not support changing groups for files/dirs
- (tested with the Solaris 11.4 NFSv4.1 server).
- Reported-by: Cedric Blancher <cedric.blancher@gmail.com>
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/open.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
- diff --git a/daemon/open.c b/daemon/open.c
- index d1ca062..c3c471f 100644
- --- a/daemon/open.c
- +++ b/daemon/open.c
- @@ -1075,8 +1075,14 @@ supersede_retry:
- * Hack: Support |setgid()|/newgrp(1)/sg(1)/winsg(1) by
- * fetching groupname from auth token for new files and
- * do a "manual" chgrp on the new file
- + *
- + * Note that |RPCSEC_AUTH_NONE| does not have any
- + * user/group information, therefore newgrp will be a
- + * NOP here.
- */
- - if (create == OPEN4_CREATE) {
- + if ((create == OPEN4_CREATE) &&
- + (state->session->client->rpc->sec_flavor !=
- + RPCSEC_AUTH_NONE)) {
- char *s;
- int chgrp_status;
- stateid_arg stateid;
- --
- 2.45.1
- From fdd89fa2affeaa42bf3993f350c9ffa40e38ce04 Mon Sep 17 00:00:00 2001
- From: Dan Shelton <dan.f.shelton@gmail.com>
- Date: Tue, 10 Jun 2025 19:45:33 +0200
- Subject: [PATCH 2/3] install: Fix "Arithmetic overflow: Using operator '+' on
- a 4 byte value and then casting the result to a 8 byte value."
- Fix "Arithmetic overflow: Using operator '+' on a 4 byte value and then
- casting the result to a 8 byte value."
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- install/nfs_install.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/install/nfs_install.c b/install/nfs_install.c
- index 9d75552..c963675 100644
- --- a/install/nfs_install.c
- +++ b/install/nfs_install.c
- @@ -101,7 +101,7 @@ int main(int ac, char *av[])
- DPRINTF(1, ("# RegQueryValueExA(), result=%d, dataSize=%d\n",
- (int)result, (int)dataSize));
- - originalValue = malloc(dataSize+1);
- + originalValue = malloc((size_t)dataSize+1);
- if (!originalValue) {
- (void)fprintf(stderr, "%s: Out of memory\n", av[0]);
- --
- 2.45.1
- From 288d7613fbacba48ac272bb2e91a098f86f77b11 Mon Sep 17 00:00:00 2001
- From: Dan Shelton <dan.f.shelton@gmail.com>
- Date: Tue, 10 Jun 2025 20:30:19 +0200
- Subject: [PATCH 3/3] sys: Fix "warning C6273: Non-integer passed as _Param_(4)
- when an integer is required in call to 'DbgPrintEx'"
- Fix "warning C6273: Non-integer passed as _Param_(4) when an integer is
- required in call to 'DbgPrintEx' Actual type: 'struct _KPROCESS *':
- if a pointer value is being passed, %p should be used."
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- sys/nfs41sys_debug.c | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
- diff --git a/sys/nfs41sys_debug.c b/sys/nfs41sys_debug.c
- index ed88ca7..ee95c9a 100644
- --- a/sys/nfs41sys_debug.c
- +++ b/sys/nfs41sys_debug.c
- @@ -79,7 +79,8 @@ ULONG __cdecl DbgP(IN PCCH fmt, ...)
- RtlTimeToTimeFields(&local_time, &time_fields);
- DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL,
- - "[%ld].[%02u:%02u:%02u.%u] %s", IoGetCurrentProcess(),
- + "[%04x].[%02u:%02u:%02u.%u] %s",
- + PsGetCurrentProcessShortDebugId(),
- time_fields.Hour, time_fields.Minute, time_fields.Second,
- time_fields.Milliseconds, msg);
- #else
- @@ -111,7 +112,8 @@ ULONG __cdecl print_error(IN PCCH fmt, ...)
- RtlTimeToTimeFields(&local_time, &time_fields);
- DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL,
- - "[%ld].[%02u:%02u:%02u.%u] %s", IoGetCurrentProcess(),
- + "[%04x].[%02u:%02u:%02u.%u] %s",
- + PsGetCurrentProcessShortDebugId(),
- time_fields.Hour, time_fields.Minute, time_fields.Second,
- time_fields.Milliseconds, msg);
- #else
- @@ -135,7 +137,8 @@ void print_hexbuf(const char *title, unsigned char *buf, int len)
- RtlTimeToTimeFields(&local_time, &time_fields);
- DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL,
- - "[%ld].[%02u:%02u:%02u.%u] %s\n", IoGetCurrentProcess(),
- + "[%04x].[%02u:%02u:%02u.%u] %s\n",
- + PsGetCurrentProcessShortDebugId(),
- time_fields.Hour, time_fields.Minute, time_fields.Second,
- time_fields.Milliseconds, title);
- for(j = 0, k = 0; j < len; j++, k++) {
- --
- 2.45.1
msnfs41client: Patches for newgrp(1) with sec=none+misc, 2025-06-10
Posted by Anonymous on Tue 10th Jun 2025 20:26
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.