This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Release 3.1] | Address Shim gss api on Linux to delay loading libgss…
…api_krb5.so while using Net6 (#43133) * Shims for Kerberos Authentication on Unix * Move SqlClient fix for .NET 6+ compatibility into SqlClient-only file (#1) * Adding OOB for System.Data.SqlClient * Addressing review comments Co-authored-by: David Engel <dengel1012@gmail.com>
- Loading branch information
1 parent
3dc21d2
commit 2269149
Showing
6 changed files
with
47 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
.../src/Common/Interop/Unix/System.Net.Security.Native/Interop.NetSecurityNative.Extended.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
internal static partial class Interop | ||
{ | ||
internal static partial class NetSecurityNative | ||
{ | ||
[DllImport(Interop.Libraries.NetSecurityNative, EntryPoint = "NetSecurityNative_EnsureGssInitialized")] | ||
private static extern int EnsureGssInitialized(); | ||
|
||
// This constructor is added to address the issue with net6 regarding | ||
// Shim gss api on Linux to delay loading libgssapi_krb5.so | ||
// issue https://github.com/dotnet/SqlClient/issues/1390 | ||
// dotnet runtime issue https://github.com/dotnet/runtime/pull/55037 | ||
static NetSecurityNative() | ||
{ | ||
if (Environment.Version.Major >= 6) | ||
{ | ||
EnsureGssInitialized(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters