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

Explicitly use chdir("/") instead of relying on ~user being set properly #535

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

bluca
Copy link
Member

@bluca bluca commented Dec 17, 2024

On non-systemd systems if the user is changed manually, polkitd will also change directory. The homedir of the user might not be set correctly, so just change to /.

This is a no-op on systemd systems, as the user is set in the unit file, so this code never runs.

On non-systemd systems if the user is changed manually, polkitd will
also change directory. The homedir of the user might not be set
correctly, so just change to /.

This is a no-op on systemd systems, as the user is set in the unit
file, so this code never runs.
@mbiebl
Copy link
Contributor

mbiebl commented Dec 17, 2024

It might not be set correctly or explicity use something like /nonexistent as in https://salsa.debian.org/utopia-team/polkit/-/blob/master/debian/polkitd.postinst#L61

@bluca
Copy link
Member Author

bluca commented Dec 20, 2024

It might not be set correctly or explicity use something like /nonexistent as in https://salsa.debian.org/utopia-team/polkit/-/blob/master/debian/polkitd.postinst#L61

Yep

@jrybar-rh any chance we can get this merged too, please? Thanks!

@jrybar-rh
Copy link
Member

It might not be set correctly or explicity use something like /nonexistent as in https://salsa.debian.org/utopia-team/polkit/-/blob/master/debian/polkitd.postinst#L61

Yep

@jrybar-rh any chance we can get this merged too, please? Thanks!

Yes, I wanted to give you chance to react. This is another strictly Debian thing. So it's up to you guys whether or not it's a desired change.
FYI, @vmihalko, @mrc0mmand and I are on Xmas vacation since Monday, so next work on polkit project is planned after New Year.
Which leads me to: Merry Christmas, happy and joyful relax and I'm looking forward to further cooperation next year!

@jrybar-rh jrybar-rh merged commit b9e1d63 into polkit-org:main Dec 20, 2024
30 checks passed
@bluca
Copy link
Member Author

bluca commented Dec 20, 2024

It might not be set correctly or explicity use something like /nonexistent as in https://salsa.debian.org/utopia-team/polkit/-/blob/master/debian/polkitd.postinst#L61

Yep
@jrybar-rh any chance we can get this merged too, please? Thanks!

Yes, I wanted to give you chance to react. This is another strictly Debian thing. So it's up to you guys whether or not it's a desired change.

Yeah we carried this patch for years, it's a fallback for the non-systemd case.

FYI, @vmihalko, @mrc0mmand and I are on Xmas vacation since Monday, so next work on polkit project is planned after New Year. Which leads me to: Merry Christmas, happy and joyful relax and I'm looking forward to further cooperation next year!

Merry christmas!

@bluca bluca deleted the chdir_root branch December 20, 2024 16:26
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.

3 participants