From c0ea0cddf0501eaee44274de9a47837d42a5d624 Mon Sep 17 00:00:00 2001 From: Andrew Dias Date: Wed, 14 Aug 2024 17:34:18 -0400 Subject: [PATCH] feat: enable integrated-auth-gssapi tiberius feature This should extend support for MSSQL integrated authentication to *nix systems. Prisma currently only supports this feature on Windows. --- Cargo.lock | 46 ++++++++++++++++++++++++++++++++++++++++++++++ quaint/Cargo.toml | 3 ++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 93a9a1305734..4f10783dfaa6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -286,14 +286,18 @@ dependencies = [ "bitflags 1.3.2", "cexpr", "clang-sys", + "clap 2.34.0", + "env_logger", "lazy_static", "lazycell", + "log", "peeking_take_while", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", + "which", ] [[package]] @@ -1293,6 +1297,19 @@ dependencies = [ "syn 2.0.58", ] +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -1840,6 +1857,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" version = "0.14.27" @@ -2201,6 +2224,28 @@ version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +[[package]] +name = "libgssapi" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "724dbcd1f871da9c67983537a47ac510c278656f6392418ad67c7a52720e54b2" +dependencies = [ + "bitflags 1.3.2", + "bytes", + "lazy_static", + "libgssapi-sys", + "parking_lot 0.11.2", +] + +[[package]] +name = "libgssapi-sys" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd7d65e409c889f6c9d81ff079371d0d8fd88d7dca702ff187ef96fb0450fb7" +dependencies = [ + "bindgen", +] + [[package]] name = "libloading" version = "0.7.4" @@ -5602,6 +5647,7 @@ dependencies = [ "futures", "futures-sink", "futures-util", + "libgssapi", "num-traits", "once_cell", "opentls", diff --git a/quaint/Cargo.toml b/quaint/Cargo.toml index 89507de20635..27185292c9f7 100644 --- a/quaint/Cargo.toml +++ b/quaint/Cargo.toml @@ -128,7 +128,7 @@ optional = true [target.'cfg(not(any(target_os = "macos", target_os = "ios")))'.dependencies.tiberius] version = "0.11.8" optional = true -features = ["sql-browser-tokio", "chrono", "bigdecimal"] +features = ["sql-browser-tokio", "chrono", "bigdecimal", "integrated-auth-gssapi"] [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.tiberius] version = "0.11.8" @@ -141,6 +141,7 @@ features = [ "bigdecimal", "tds73", "winauth", + "integrated-auth-gssapi" ] [dependencies.bigdecimal]