Skip to content
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

fix(login): Fixed User desktop login failure after the.Xauthority file permission or authname is modified #326

Closed
wants to merge 1 commit into from

Conversation

winnerym100
Copy link

Fixed User desktop login failure after the.Xauthority file permission or authname is modified

Description: 修复用户的.Xauthority文件权限或authname被修改后无法登录用户桌面问题

Log: null

@github-actions
Copy link

github-actions bot commented Oct 20, 2023

Everyone contributing to this PR have now signed the CLA. Thanks!

@@ -294,7 +294,8 @@ x_authority_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename,
if (!matched &&
priv->family == a_priv->family &&
address_matches &&
strcmp (priv->number, a_priv->number) == 0)
strcmp (priv->number, a_priv->number) == 0 &&
strcmp (priv->authorization_name, a_priv->authorization_name) == 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks good, but it unrelated to the above change - can you do these as two separate PRs?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will resubmit the PR separately. Thank you!

privileges_drop (user_get_uid (user), user_get_gid (user));
if (x_authority_filename && chmod (x_authority_filename, S_IRUSR | S_IWUSR) < 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chmod should be in x-authority.c I think - that's where it is set for newly created files.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the actual application process, an old file was accidentally modified with permissions, resulting in the inability to start a user session. This is done to remedy this abnormal situation.

Copy link

github-actions bot commented Nov 3, 2023

Everyone contributing to this PR have now signed the CLA. Thanks!

…ority file's authname is modified

Description: 修复用户的.Xauthority文件的authname被修改后无法登录用户桌面问题

Log: null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants