pastebin - collaborative debugging tool
rovema.kpaste.net RSS


[patch] msnfs41client: Fixes for winsg+misc, 2025-06-17 ...
Posted by Anonymous on Tue 17th Jun 2025 14:18
raw | new post

  1. From bf72e84065ecc8d9f7653a0740bcfc813a9eedbe Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Tue, 17 Jun 2025 14:48:20 +0200
  4. Subject: [PATCH 1/3] tests: Fix $ winsg /g None /C 'C:\cygwin64\bin\id.exe -a'
  5.  #
  6.  
  7. Fix $ winsg /g None /C 'C:\cygwin64\bin\id.exe -a' # - it
  8. fails because a normal |char *| instead of |wchar_t *| string
  9. was passed to |_wspawnl()|.
  10.  
  11. Reported-by: Aurelien Couderc <aurelien.couderc2002@gmail.com>
  12. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  13. ---
  14. tests/winsg/winsg.c | 2 +-
  15.  1 file changed, 1 insertion(+), 1 deletion(-)
  16.  
  17. diff --git a/tests/winsg/winsg.c b/tests/winsg/winsg.c
  18. index 77600f3..b744c56 100644
  19. --- a/tests/winsg/winsg.c
  20. +++ b/tests/winsg/winsg.c
  21. @@ -525,7 +525,7 @@ int wmain(int ac, wchar_t *av[])
  22.              if (av[cmd_arg_index] != NULL) {
  23.                  subcmdret = _wspawnl(_P_WAIT,
  24.                      WIN32_CMDEXE_PATH, WIN32_CMDEXE_PATH,
  25. -                    "/C", av[cmd_arg_index], NULL);
  26. +                    L"/C", av[cmd_arg_index], NULL);
  27.              }
  28.              else {
  29.                  subcmdret = _wspawnl(_P_WAIT,
  30. --
  31. 2.45.1
  32.  
  33. From ee5dde5c410421febfee5edbc580a6ad8417bfb0 Mon Sep 17 00:00:00 2001
  34. From: Roland Mainz <roland.mainz@nrubsig.org>
  35. Date: Tue, 17 Jun 2025 14:54:18 +0200
  36. Subject: [PATCH 2/3] tests: winsg: Cleanup non-|wchar_t| string literals
  37.  
  38. winsg: Cleanup non-|wchar_t| string literals.
  39.  
  40. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  41. ---
  42. tests/winsg/winsg.c | 14 +++++++-------
  43.  1 file changed, 7 insertions(+), 7 deletions(-)
  44.  
  45. diff --git a/tests/winsg/winsg.c b/tests/winsg/winsg.c
  46. index b744c56..bfc0b49 100644
  47. --- a/tests/winsg/winsg.c
  48. +++ b/tests/winsg/winsg.c
  49. @@ -150,12 +150,12 @@ bool is_group_in_token(HANDLE tok, PSID qsid)
  50.      for (i = 0 ; i < ptgroups->GroupCount ; i++) {
  51.          if (EqualSid(qsid, ptgroups->Groups[i].Sid) &&
  52.              (ptgroups->Groups[i].Attributes & SE_GROUP_ENABLED)) {
  53. -            D((void)puts("is_group_in_token: #match"));
  54. +            D((void)fwprintf(stdout, L"is_group_in_token: #match\n"));
  55.              return true;
  56.          }
  57.      }
  58.  
  59. -    D((void)puts("is_group_in_token: #no match"));
  60. +    D((void)fwprintf(stdout, L"is_group_in_token: #no match\n"));
  61.  
  62.      return false;
  63.  }
  64. @@ -198,7 +198,7 @@ int print_groups_in_token(HANDLE tok)
  65.          if (!LookupAccountSidW(NULL, ptgroups->Groups[i].Sid,
  66.              namebuffer, &namesize, domainbuffer, &domainbuffer_size, &name_use)) {
  67.              D((void)fwprintf(stderr, L"print_groups_in_token: "
  68. -                "LookupAccountSidW() failed, status=%d.\n",
  69. +                L"LookupAccountSidW() failed, status=%d.\n",
  70.                  (int)GetLastError()));
  71.              continue;
  72.          }
  73. @@ -306,8 +306,8 @@ int usage(void)
  74.              L"winsg -g ...\n"
  75.          L"\t\twinsg -L\n"
  76.          L"\n"
  77. -        "Please report bugs to "
  78. -        "Roland Mainz <roland.mainz@nrubsig.org>.\n");
  79. +        L"Please report bugs to "
  80. +        L"Roland Mainz <roland.mainz@nrubsig.org>.\n");
  81.  
  82.      return 2;
  83.  }
  84. @@ -463,7 +463,7 @@ int wmain(int ac, wchar_t *av[])
  85.          wchar_t pgroupname[GNLEN+1];
  86.  
  87.          get_token_primarygroup_name(tok, pgroupname);
  88. -        (void)printf("primary group name '%ls'\n", pgroupname);
  89. +        (void)fwprintf(stdout, L"primary group name '%ls'\n", pgroupname);
  90.      )
  91.  
  92.      DECLARE_SID_BUFFER(sidbuff);
  93. @@ -495,7 +495,7 @@ int wmain(int ac, wchar_t *av[])
  94.  
  95.      D(
  96.          get_token_primarygroup_name(tok, pgroupname);
  97. -        (void)printf("primary group name '%ls'\n", pgroupname);
  98. +        (void)fwprintf(stdout, L"primary group name '%ls'\n", pgroupname);
  99.      )
  100.  
  101.      (void)_flushall();
  102. --
  103. 2.45.1
  104.  
  105. From ccb3a2cfbf6a7086d0483058b8587c49930fcb15 Mon Sep 17 00:00:00 2001
  106. From: Roland Mainz <roland.mainz@nrubsig.org>
  107. Date: Tue, 17 Jun 2025 15:12:53 +0200
  108. Subject: [PATCH 3/3] cygwin: Install 32bit versions of winsg and nfs_ea on
  109.  64bit installations
  110.  
  111. Install 32bit versions of winsg.exe and nfs_ea.exe on 64bit installations
  112. (e.g. for API testing).
  113.  
  114. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  115. ---
  116. cygwin/Makefile.install | 12 ++++++++----
  117.  1 file changed, 8 insertions(+), 4 deletions(-)
  118.  
  119. diff --git a/cygwin/Makefile.install b/cygwin/Makefile.install
  120. index 1b6ed34..e3d8e5a 100644
  121. --- a/cygwin/Makefile.install
  122. +++ b/cygwin/Makefile.install
  123. @@ -115,15 +115,19 @@ installdest:
  124.         if [[ "$(CYGWIN_BASEPATH)" == *64* ]] ; then \
  125.                 (cd $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/ && ln -sf lssparse.x86_64.exe lssparse.exe) \
  126.         fi
  127. +       cp "$(PROJECT_BASEDIR_DIR)/tests/winsg/winsg.x86_64.exe" $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/winsg.x86_64.exe
  128. +       cp "$(PROJECT_BASEDIR_DIR)/tests/winsg/winsg.i686.exe" $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/winsg.i686.exe
  129.         if [[ "$(CYGWIN_BASEPATH)" == *64* ]] ; then \
  130. -               cp "$(PROJECT_BASEDIR_DIR)/tests/winsg/winsg.x86_64.exe" $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/winsg.exe ; \
  131. +               (cd $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/ && ln -sf winsg.x86_64.exe winsg.exe) \
  132.         else \
  133. -               cp "$(PROJECT_BASEDIR_DIR)/tests/winsg/winsg.i686.exe" $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/winsg.exe ; \
  134. +               (cd $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/ && ln -sf winsg.i686.exe winsg.exe) \
  135.         fi
  136. +       cp "$(PROJECT_BASEDIR_DIR)/tests/ea/nfs_ea.x86_64.exe" $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/nfs_ea.x86_64.exe
  137. +       cp "$(PROJECT_BASEDIR_DIR)/tests/ea/nfs_ea.i686.exe" $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/nfs_ea.i686.exe
  138.         if [[ "$(CYGWIN_BASEPATH)" == *64* ]] ; then \
  139. -               cp "$(PROJECT_BASEDIR_DIR)/tests/ea/nfs_ea.x86_64.exe" $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/nfs_ea.exe ; \
  140. +               (cd $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/ && ln -sf nfs_ea.x86_64.exe nfs_ea.exe) \
  141.         else \
  142. -               cp "$(PROJECT_BASEDIR_DIR)/tests/ea/nfs_ea.i686.exe" $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/nfs_ea.exe ; \
  143. +               (cd $(DESTDIR)/$(CYGWIN_BASEPATH)/bin/ && ln -sf nfs_ea.i686.exe nfs_ea.exe) \
  144.         fi
  145.         cp $(PROJECT_BASEDIR_DIR)/tests/nfsbuildtest/nfsbuildtest.ksh93 $(DESTDIR)/$(CYGWIN_BASEPATH)/usr/share/msnfs41client/tests/misc/nfsbuildtest.ksh93
  146.         cp $(PROJECT_BASEDIR_DIR)/tests/sparsefiles/testsparsefile1.ksh $(DESTDIR)/$(CYGWIN_BASEPATH)/usr/share/msnfs41client/tests/sparsefiles/testsparsefile1.ksh
  147. --
  148. 2.45.1

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