Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

[Release 3.1] | Address Shim gss api on Linux to delay loading libgssapi_krb5.so while using Net6 #43133

Merged
merged 4 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pkg/Microsoft.Private.PackageBaseline/packageIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -1548,9 +1548,10 @@
"4.8.0",
"4.8.1",
"4.8.2",
"4.8.3"
"4.8.3",
"4.8.4"
],
"BaselineVersion": "4.8.3",
"BaselineVersion": "4.8.4",
carlossanlop marked this conversation as resolved.
Show resolved Hide resolved
"InboxOn": {
"net461": "4.1.0.0",
"monoandroid10": "Any",
Expand All @@ -1574,7 +1575,8 @@
"4.6.1.0": "4.8.0",
"4.6.1.1": "4.8.1",
"4.6.1.2": "4.8.2",
"4.6.1.3": "4.8.3"
"4.6.1.3": "4.8.3",
"4.6.1.4": "4.8.4"
}
},
"System.Data.SqlXml": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<PrereleaseLibraryPackage Include="System.Data.OleDb" />
<PrereleaseLibraryPackage Include="System.Data.SqlClient">
<!-- SQL client defines its own version, higher than rest of master -->
<Version>4.8.3</Version>
<Version>4.8.4</Version>
JRahnama marked this conversation as resolved.
Show resolved Hide resolved
</PrereleaseLibraryPackage>
<PrereleaseLibraryPackage Include="System.Drawing.Common" />
<PrereleaseLibraryPackage Include="System.Diagnostics.EventLog" />
Expand Down
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")]
David-Engel marked this conversation as resolved.
Show resolved Hide resolved
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();
}
}
}
}
1 change: 1 addition & 0 deletions src/System.Data.SqlClient/src/System.Data.SqlClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@
<Compile Include="$(CommonPath)\Microsoft\Win32\SafeHandles\GssSafeHandles.cs">
<Link>Common\Microsoft\Win32\SafeHandles\GssSafeHandles.cs</Link>
</Compile>
<Compile Include="Common\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.Extended.cs" />
<Compile Include="$(CommonPath)\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.cs">
<Link>Common\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.cs</Link>
</Compile>
Expand Down