public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix build with w32api 10.0.0
@ 2022-04-12 17:32 Jon Turney
  2022-04-12 17:32 ` [PATCH 1/2] Cygwin: " Jon Turney
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jon Turney @ 2022-04-12 17:32 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon Turney

Jon Turney (2):
  Cygwin: Fix build with w32api 10.0.0
  Cygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY

 winsup/cygwin/sec_auth.cc | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] Cygwin: Fix build with w32api 10.0.0
  2022-04-12 17:32 [PATCH 0/2] Fix build with w32api 10.0.0 Jon Turney
@ 2022-04-12 17:32 ` Jon Turney
  2022-04-12 17:32 ` [PATCH 2/2] Cygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY Jon Turney
  2022-04-27  9:30 ` [PATCH 0/2] Fix build with w32api 10.0.0 Corinna Vinschen
  2 siblings, 0 replies; 6+ messages in thread
From: Jon Turney @ 2022-04-12 17:32 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon Turney

> ../../../../src/winsup/cygwin/sec_auth.cc:1240:16: error: redefinition of ‘struct _MSV1_0_S4U_LOGON’
>  1240 | typedef struct _MSV1_0_S4U_LOGON
>       |                ^~~~~~~~~~~~~~~~~
> In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10,
>                  from ../../../../src/winsup/cygwin/sec_auth.cc:13:
> /usr/include/w32api/ntsecapi.h:1425:18: note: previous definition of ‘struct _MSV1_0_S4U_LOGON’
>  1425 |   typedef struct _MSV1_0_S4U_LOGON {
>       |                  ^~~~~~~~~~~~~~~~~
> ../../../../src/winsup/cygwin/sec_auth.cc:1246:3: error: conflicting declaration ‘typedef int MSV1_0_S4U_LOGON’
>  1246 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
>       |   ^~~~~~~~~~~~~~~~
> In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10,
>                  from ../../../../src/winsup/cygwin/sec_auth.cc:13:
> /usr/include/w32api/ntsecapi.h:1430:5: note: previous declaration as ‘typedef struct _MSV1_0_S4U_LOGON MSV1_0_S4U_LOGON’
>  1430 |   } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
>       |     ^~~~~~~~~~~~~~~~
> ../../../../src/winsup/cygwin/sec_auth.cc:1246:22: error: conflicting declaration ‘typedef int* PMSV1_0_S4U_LOGON’
>  1246 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
>       |                      ^~~~~~~~~~~~~~~~~
> In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10,
>                  from ../../../../src/winsup/cygwin/sec_auth.cc:13:
> /usr/include/w32api/ntsecapi.h:1430:24: note: previous declaration as ‘typedef struct _MSV1_0_S4U_LOGON* PMSV1_0_S4U_LOGON’
>  1430 |   } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
---
 winsup/cygwin/sec_auth.cc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc
index 121d55e05..0e5aaeb0b 100644
--- a/winsup/cygwin/sec_auth.cc
+++ b/winsup/cygwin/sec_auth.cc
@@ -1232,8 +1232,9 @@ out:
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-/* In Mingw-w64, MsV1_0S4ULogon and MSV1_0_S4U_LOGON are only defined
-   in ddk/ntifs.h.  We can't include this. */
+/* In w32api prior to 10.0.0, MsV1_0S4ULogon and MSV1_0_S4U_LOGON are only
+   defined in ddk/ntifs.h, which we can't include. */
+#if (__MINGW64_VERSION_MAJOR < 10)
 
 #define MsV1_0S4ULogon ((MSV1_0_LOGON_SUBMIT_TYPE) 12)
 
@@ -1248,6 +1249,8 @@ typedef struct _MSV1_0_S4U_LOGON
 /* Missing in Mingw-w64 */
 #define KERB_S4U_LOGON_FLAG_IDENTITY 0x08
 
+#endif
+
 /* If logon is true we need an impersonation token.  Otherwise we just
    need an identification token, e. g. to fetch the group list. */
 HANDLE
-- 
2.35.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] Cygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY
  2022-04-12 17:32 [PATCH 0/2] Fix build with w32api 10.0.0 Jon Turney
  2022-04-12 17:32 ` [PATCH 1/2] Cygwin: " Jon Turney
@ 2022-04-12 17:32 ` Jon Turney
  2022-04-27  9:30 ` [PATCH 0/2] Fix build with w32api 10.0.0 Corinna Vinschen
  2 siblings, 0 replies; 6+ messages in thread
From: Jon Turney @ 2022-04-12 17:32 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon Turney

---
 winsup/cygwin/sec_auth.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc
index 0e5aaeb0b..2b1ce2203 100644
--- a/winsup/cygwin/sec_auth.cc
+++ b/winsup/cygwin/sec_auth.cc
@@ -1247,7 +1247,7 @@ typedef struct _MSV1_0_S4U_LOGON
 } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
 
 /* Missing in Mingw-w64 */
-#define KERB_S4U_LOGON_FLAG_IDENTITY 0x08
+#define KERB_S4U_LOGON_FLAG_IDENTIFY 0x08
 
 #endif
 
@@ -1368,7 +1368,7 @@ s4uauth (bool logon, PCWSTR domain, PCWSTR user, NTSTATUS &ret_status)
       RtlSecureZeroMemory (authinf, authinf_size);
       s4u_logon = (KERB_S4U_LOGON *) authinf;
       s4u_logon->MessageType = KerbS4ULogon;
-      s4u_logon->Flags = logon ? 0 : KERB_S4U_LOGON_FLAG_IDENTITY;
+      s4u_logon->Flags = logon ? 0 : KERB_S4U_LOGON_FLAG_IDENTIFY;
       /* Append user to login info */
       RtlInitEmptyUnicodeString (&s4u_logon->ClientUpn,
 				 (PWCHAR) (s4u_logon + 1),
-- 
2.35.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Fix build with w32api 10.0.0
  2022-04-12 17:32 [PATCH 0/2] Fix build with w32api 10.0.0 Jon Turney
  2022-04-12 17:32 ` [PATCH 1/2] Cygwin: " Jon Turney
  2022-04-12 17:32 ` [PATCH 2/2] Cygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY Jon Turney
@ 2022-04-27  9:30 ` Corinna Vinschen
  2022-04-28  0:29   ` Takashi Yano
  2 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2022-04-27  9:30 UTC (permalink / raw)
  To: cygwin-patches

On Apr 12 18:32, Jon Turney via Cygwin-patches wrote:
> Jon Turney (2):
>   Cygwin: Fix build with w32api 10.0.0
>   Cygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY
                                         ^^^^^^^^^^^^^^^^^^^^
                                         Ooooops

LGTM, thanks,
Corinna

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Fix build with w32api 10.0.0
  2022-04-27  9:30 ` [PATCH 0/2] Fix build with w32api 10.0.0 Corinna Vinschen
@ 2022-04-28  0:29   ` Takashi Yano
  2022-04-28 13:23     ` Jon Turney
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Yano @ 2022-04-28  0:29 UTC (permalink / raw)
  To: cygwin-patches

On Wed, 27 Apr 2022 11:30:44 +0200
Corinna Vinschen wrote:
> On Apr 12 18:32, Jon Turney via Cygwin-patches wrote:
> > Jon Turney (2):
> >   Cygwin: Fix build with w32api 10.0.0
> >   Cygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY
>                                          ^^^^^^^^^^^^^^^^^^^^
>                                          Ooooops
> 
> LGTM, thanks,
> Corinna

Shouldn't these patches be applied also to cygwin-3_3-branch?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Fix build with w32api 10.0.0
  2022-04-28  0:29   ` Takashi Yano
@ 2022-04-28 13:23     ` Jon Turney
  0 siblings, 0 replies; 6+ messages in thread
From: Jon Turney @ 2022-04-28 13:23 UTC (permalink / raw)
  To: Cygwin Patches

On 28/04/2022 01:29, Takashi Yano wrote:
> On Wed, 27 Apr 2022 11:30:44 +0200
> Corinna Vinschen wrote:
>> On Apr 12 18:32, Jon Turney via Cygwin-patches wrote:
>>> Jon Turney (2):
>>>    Cygwin: Fix build with w32api 10.0.0
>>>    Cygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY
>>                                           ^^^^^^^^^^^^^^^^^^^^
>>                                           Ooooops
>>
>> LGTM, thanks,
>> Corinna
> 
> Shouldn't these patches be applied also to cygwin-3_3-branch?
> 

Yes, I guess so.  My mistake that they weren't.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-28 13:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 17:32 [PATCH 0/2] Fix build with w32api 10.0.0 Jon Turney
2022-04-12 17:32 ` [PATCH 1/2] Cygwin: " Jon Turney
2022-04-12 17:32 ` [PATCH 2/2] Cygwin: Fix typo KERB_S4U_LOGON_FLAG_IDENTITY -> IDENTIFY Jon Turney
2022-04-27  9:30 ` [PATCH 0/2] Fix build with w32api 10.0.0 Corinna Vinschen
2022-04-28  0:29   ` Takashi Yano
2022-04-28 13:23     ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).