Repository navigation
fix(changepasswd): consistent connect logging and connection timeout across all protocols - #2291
Merged
Merged
Conversation
Collaborator
|
Hey, i've been reviewing this PR and found some issues that need correcting:
|
alexisbalbachan
requested changes
Oct 21, 2026
alexisbalbachan
left a comment
Collaborator
There was a problem hiding this comment.
See previous comment
Contributor
Author
alexisbalbachan
approved these changes
Oct 28, 2026
Collaborator
|
Hi, everything looks good and ready to merge, about your question, there's no need to change the timeout 0 value behavior in the scope of those PRs, the change can be introduced in a follow up PR |
Contributor
Author
|
Thanks! But #2290 should be merged to make this one usable no? Or now closed? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
changepasswd.pycould go straight from "connecting" to success or failure, with no way to tell which step a hang was stuck on, and no way to bound how long it waited.Building on #2217 (LDAP timeout) and #2253 (Kerberos/kpasswd timeout), and depending on #2290 (endpoint mapper timeout), which should land first:
smb-samr,rpc-samr,kpasswd,ldap) now log a connect step before the actual network call, and a-timeoutflag is wired through to all of them.LdapPassword.connect()splits connecting and authenticating into two separate log lines, and catchesOSErrorso an unreachable or filtered DC fails cleanly instead of a raw traceback.KPasswordlogs before requesting the TGT and before sending the actualkpasswdrequest (a different host/port from the KDC), andkpasswd.setPassword()logs the same on the library side.SamrPassword.authenticate()now callsset_connect_timeout()on the RPC transport, andconnect()catches connection-level failures (OSError, andDCERPCExceptionfor the RPC-over-TCP path) cleanly.RpcPassword.rpctransport()forwardstimeoutintohept_map(), closing the last gap: the endpoint mapper lookup on TCP/135.Tested against an unreachable host for each protocol: all four fail cleanly at roughly the given
-timeoutvalue instead of hanging (or, for SAMR, hitting the hardcoded 30 second default) or crashing with a raw traceback.Regards