-
Notifications
You must be signed in to change notification settings - Fork 153
feat: added sspi ntlm without kerberos using sspi-rs #408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
beeaf2c
9fc93bc
5ab7325
965a66d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -48,6 +48,9 @@ pub enum Error { | |||||||||||||||||||||||||||||||||
| /// An error from the GSSAPI library. | ||||||||||||||||||||||||||||||||||
| #[error("GSSAPI Error: {}", _0)] | ||||||||||||||||||||||||||||||||||
| Gssapi(String), | ||||||||||||||||||||||||||||||||||
| /// An error in the sspi-rs library. | ||||||||||||||||||||||||||||||||||
| #[error("sspi-rs Error {}", _0)] | ||||||||||||||||||||||||||||||||||
| SspiRs(String), | ||||||||||||||||||||||||||||||||||
|
coderabbitai[bot] marked this conversation as resolved.
coderabbitai[bot] marked this conversation as resolved.
|
||||||||||||||||||||||||||||||||||
| #[error( | ||||||||||||||||||||||||||||||||||
| "Server requested a connection to an alternative address: `{}:{}`", | ||||||||||||||||||||||||||||||||||
| host, | ||||||||||||||||||||||||||||||||||
|
|
@@ -83,7 +86,7 @@ impl Error { | |||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| impl From<uuid::Error> for Error { | ||||||||||||||||||||||||||||||||||
| fn from(e: uuid::Error) -> Self { | ||||||||||||||||||||||||||||||||||
| Self::Conversion(format!("Error convertiong a Guid value {}", e).into()) | ||||||||||||||||||||||||||||||||||
| Self::Conversion(format!("Error converting a Guid value {}", e).into()) | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
@@ -157,3 +160,10 @@ impl From<libgssapi::error::Error> for Error { | |||||||||||||||||||||||||||||||||
| Error::Gssapi(format!("{}", err)) | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| #[cfg(all(unix, feature = "sspi-rs"))] | ||||||||||||||||||||||||||||||||||
| impl From <sspi::Error> for Error { | ||||||||||||||||||||||||||||||||||
| fn from(err: sspi::Error) -> Self { | ||||||||||||||||||||||||||||||||||
| Error::SspiRs(format!("{}", err)) | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+170
to
+179
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Add doc cfg attribute for consistency with GSSAPI impl. The 📚 Proposed fix to add doc cfg attribute #[cfg(all(unix, feature = "sspi-rs"))]
+#[cfg_attr(
+ feature = "docs",
+ doc(cfg(all(unix, feature = "sspi-rs")))
+)]
impl From<sspi::Error> for Error {
fn from(err: sspi::Error) -> Self {
Error::SspiRs(format!("{}", err))
}
}📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect
docattribute syntax — missingcfg()wrapper.The
doc(any(...))syntax is invalid. It should bedoc(cfg(any(...)))to properly display the "Available on..." badge in rustdoc. Compare with the existingIntegratedvariant at line 76 which correctly usesdoc(cfg(any(...))).This same issue appears at lines 41-44, 62-65, and 97.
Proposed fix for all occurrences
#[cfg_attr( feature = "docs", - doc(any(all(windows, feature = "winauth"), all(unix, feature = "sspi-rs"))) + doc(cfg(any(all(windows, feature = "winauth"), all(unix, feature = "sspi-rs")))) )]Apply the same pattern to lines 41-44, 62-65, and fix line 97:
📝 Committable suggestion