Skip to content

homed uidmap (and other) fixes#21506

Merged
yuwata merged 6 commits intosystemd:mainfrom
poettering:homed-uidmap-fixes
Nov 25, 2021
Merged

homed uidmap (and other) fixes#21506
yuwata merged 6 commits intosystemd:mainfrom
poettering:homed-uidmap-fixes

Conversation

@poettering
Copy link
Copy Markdown
Member

Fixes: #21441

In 57bb9bc support was added to read
"cheap" passwords from env vars and stuff before issuing the first
operation, instead of waiting for it until the first operation failed.

This was added for most verbs of "homectl", but two were left out:
update + passwd. Add it there too.
When we want to operate on an already activated home area we so far
tried to reapply the uidmapping logic. We shouldn't do that, it's
already applied after all.

We only want to apply this for newly activated home areas. Hence check
for the right HomeSetupFlags flag for it HOME_SETUP_ALREADY_ACTIVATED.

The patch is actually in theory a two-liner. Except that so far we don#t
pass the HomeSetupFlags flags down all necessary functions where the
uidmap stuff will eventually run. Hence this larger than intended
commit.
…dating home areas

This adds uidmap shifting also when resizing/updating/changing
passwords. Prviously I thought we didn't have to, because the user is
not going to access the uidmap if we only quickly activate the home
area. But this thinking is wrong, because the three operations will
result in an update ~/.identity fie to be written, and we should do that
with uidmap applied, so that its ownership maps down to nobody below as
intended.

Fixes: systemd#21441
@poettering poettering added the homed homed, homectl, pam_homed label Nov 24, 2021
@poettering
Copy link
Copy Markdown
Member Author

Yay, all ArchLinux CIs passed again!

Copy link
Copy Markdown
Member

@yuwata yuwata left a comment

Choose a reason for hiding this comment

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

LGTM.

@yuwata yuwata merged commit 030e2a7 into systemd:main Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

homed homed, homectl, pam_homed

Development

Successfully merging this pull request may close these issues.

Spurious fails in TEST-46-HOMED

2 participants