- From f65fe1d07eea059163a83efe97052ceecbaa6097 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 22 Feb 2024 14:31:38 +0100
- Subject: [PATCH 1/3] cygwin: Fix "installdest" target failure in Cygwin 3.6.0
- Fix "installdest" Makefile target failure in Cygwin 3.6.0,
- caused by bash now setting the process title to the command it is
- currently executing.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- diff --git a/cygwin/Makefile b/cygwin/Makefile
- index e2953c7..44f3308 100644
- --- a/cygwin/Makefile
- +++ b/cygwin/Makefile
- @@ -51,7 +51,7 @@ installdest: $(VS_BUILD_DIR)/nfsd.exe \
- $(PROJECT_BASEDIR_DIR)/etc_netconfig \
- $(PROJECT_BASEDIR_DIR)/ms-nfs41-idmap.conf \
- $(CYGWIN_MAKEFILE_DIR)/devel/msnfs41client.bash
- - @if [[ "$$(ps -ef)" =~ "$(DESTDIR)" ]] ; then \
- + @if [[ "$$(ps -ef | grep -v -E "[[:space:]]+$${BASH_PID}[[:space:]]+")" =~ "$(DESTDIR)" ]] ; then \
- printf 'DIR %q is in use by a process\n' "$DESTDIR" 1>&2 ; \
- exit 1 ; \
- fi
- --
- 2.43.0
- From a05b34c5e48d525833264751dff51628c615799b Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 22 Feb 2024 15:14:51 +0100
- Subject: [PATCH 2/3] cygwin: msnfs41client.bash: Add support for VSDiagnostics
- profiling
- Add support for VSDiagnostics.exe profiling to msnfs41client.bash
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/devel/msnfs41client.bash | 29 +++++++++++++++++++++++++++++
- 1 file changed, 29 insertions(+)
- diff --git a/cygwin/devel/msnfs41client.bash b/cygwin/devel/msnfs41client.bash
- index 07c1dd5..8474264 100644
- --- a/cygwin/devel/msnfs41client.bash
- +++ b/cygwin/devel/msnfs41client.bash
- @@ -202,6 +202,18 @@ function nfsclient_rundeamon
- '--crtdbgmem' 'none'
- )
- "${nfsd_args[@]}"
- + elif false ; then
- + typeset -i vsdiagnostics_id=50
- + VSDiagnostics \
- + start ${vsdiagnostics_id} \
- + "/launch:$(cygpath -w "$PWD/nfsd_debug.exe")" \
- + "/launchArgs:${nfsd_args[*]:1}" \
- + "/loadConfig:$(cygpath -w "${vsdiagnostics_path}/AgentConfigs/CpuUsageHigh.json")"
- + printf '#\n'
- + printf '# use\n'
- + printf '# $ "%s" stop %d /output:nfsd_debug%d # to correct profiling data\n#\n' \
- + "$(which -a 'VSDiagnostics.exe')" \
- + "${vsdiagnostics_id}" "$$"
- else
- "${nfsd_args[@]}"
- fi
- @@ -283,7 +295,20 @@ function nfsclient_system_rundeamon
- '--crtdbgmem' 'none'
- )
- "${nfsd_args[@]}"
- + elif false ; then
- + typeset -i vsdiagnostics_id=50
- + VSDiagnostics \
- + start ${vsdiagnostics_id} \
- + "/launch:$(cygpath -w "$PWD/nfsd_debug.exe")" \
- + "/launchArgs:${nfsd_args[*]:1}" \
- + "/loadConfig:$(cygpath -w "${vsdiagnostics_path}/AgentConfigs/CpuUsageHigh.json")"
- + printf '#\n'
- + printf '# use\n'
- + printf '# $ "%s" stop %d /output:nfsd_debug%d # to correct profiling data\n#\n' \
- + "$(which -a 'VSDiagnostics.exe')" \
- + "${vsdiagnostics_id}" "$$"
- else
- +
- "${nfsd_args[@]}"
- fi
- return $?
- @@ -407,6 +432,10 @@ function main
- # path to WinDBG cdb (fixme: 64bit x86-specific)
- PATH+=':/cygdrive/c/Program Files (x86)/Windows Kits/10/Debuggers/x64/'
- + # PATH to VSDiagnostics.exe and AgentConfigs
- + vsdiagnostics_path='/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/Team Tools/DiagnosticsHub/Collector/'
- + PATH+=":${vsdiagnostics_path}"
- +
- # my own path to pstools
- PATH+=':/home/roland_mainz/work/win_pstools/'
- --
- 2.43.0
- From cfa13ae6ed3c1a818f76543cbc9feb288c8414f2 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Thu, 22 Feb 2024 16:30:55 +0100
- Subject: [PATCH 3/3] daemon: |map_nfs4servername_2_sid()| should treat
- |SidTypeAlias| as (local) group
- Treat |SidTypeAlias| returned by |LookupAccountNameA()| as a (local)
- group in |map_nfs4servername_2_sid()|.
- See
- https://stackoverflow.com/questions/39373188/lookupaccountnamew-returns-sidtypealias-but-expected-sidtypegroup
- for more information.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/sid.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
- diff --git a/daemon/sid.c b/daemon/sid.c
- index a145607..881b638 100644
- --- a/daemon/sid.c
- +++ b/daemon/sid.c
- @@ -517,6 +517,24 @@ int map_nfs4servername_2_sid(nfs41_daemon_globals *nfs41dg, int query, DWORD *si
- out:
- #ifdef NFS41_DRIVER_SID_CACHE
- if ((status == 0) && *sid) {
- + if ((query & GROUP_SECURITY_INFORMATION) &&
- + (sid_type == SidTypeAlias)) {
- + /*
- + * Treat |SidTypeAlias| as (local) group
- + *
- + * It seems that |LookupAccountNameA()| will always return
- + * |SidTypeAlias| for local groups created with
- + * $ net localgroup cygwingrp1 /add #
- + *
- + * References:
- + * - https://stackoverflow.com/questions/39373188/lookupaccountnamew-returns-sidtypealias-but-expected-sidtypegroup
- + */
- + DPRINTF(1, ("map_nfs4servername_2_sid(query=%x,name='%s'): "
- + "SID_TYPE='SidTypeAlias' mapped to 'SidTypeGroup'\n",
- + query, orig_name, sid_type));
- + sid_type = SidTypeGroup;
- + }
- +
- switch (sid_type) {
- case SidTypeUser:
- sidcache_add(&user_sidcache, orig_name, *sid);
- --
- 2.43.0
msnfs41client: Patches for SidTypeAlias (chgrp support), Cygwin 3.6.0 and misc, 2024-02-22
Posted by Anonymous on Thu 22nd Feb 2024 16:11
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.