-
Notifications
You must be signed in to change notification settings - Fork 23
CP-45360: Update xsconsole to python3 #15
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
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1a62714
Update xsconsole to python3
qinz0822 c811aa0
Fix python2 issues manually
qinz0822 0c0f1cf
CP-45360: Update pam authentication code based on python3-pam package
qinz0822 f313ba1
CP-45360: Make the output from Popen.communicate as strings rather th…
qinz0822 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
This fixes PAM Authentication (for sure on XS8, please test for XS9 too):
It was really easy to find using Googling '"pam.authentication" False python':
The default argument is:
pam.authenticate(user, pass, service="login")service="login"also checks if the user's tty is in/etc/securettyOn XS8, and (among serial lines, etc) there is only
pts/0in/etc/securetty.But if you are logged in over SSH, you might get the pty
pts/2, for example.When
pam.authenticate(user, pass, service="login")does not find your SSH pty in/etc/securetty, it rejects the login.Thus, it may happen if you open multiple SSH sessions and also test it on one of the sessions which don't have
pts/0, it could fail on XS9 too:Example command line:
Adding using
service="passwd"is the correct thing to do be in line to what the existing python2 PAM auth does on XenServer so far.It is possible that the same happens on xs9 too, but you might not have run into it if you only tested xsconsole on the default terminals and never called it on a second or third SSH pty.
Reference: FirefighterBlu3/python-pam#13