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

Use separate homu user for Homu-related states #615

Closed
wants to merge 1 commit into from

Conversation

ALikhachev
Copy link

@ALikhachev ALikhachev commented Mar 9, 2017

Fixes #422

  • Added 'homu' user
  • Added parameters to run pip and virtualenv under 'homu' user
  • Changed homu config owner and permissions to prevent it to be read by strangers :)
  • Added code that tests these changes

This change is Reviewable

@highfive
Copy link

highfive commented Mar 9, 2017

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @aneeshusa (or someone else) soon.

user.present:
- fullname: Homu
- shell: /bin/bash
- home: /home/servo/homu
Copy link
Contributor

Choose a reason for hiding this comment

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

Homu should have its own home directory completely separate from servo, i.e. /home/homu. We'll also need to have some manual deployment steps for this to move the homu db to the right place by hand.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should also create a homu group as the primary group of the homu user.

Copy link
Contributor

@aneeshusa aneeshusa left a comment

Choose a reason for hiding this comment

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

You also need to update homu/files/homu.conf to run the service as the homu user.

user.present:
- fullname: Homu
- shell: /bin/bash
- home: /home/servo/homu
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also create a homu group as the primary group of the homu user.



def run():
for root, directories, filenames in os.walk('/home/servo/homu/'):
Copy link
Contributor

Choose a reason for hiding this comment

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

This will also check files like .profile for the homu user. I think it's OK if we only check permissions on Homu's cfg.toml file (and the database if it exists).

- mode: 644
- user: homu
- group: homu
- mode: 640
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this file is no longer world-readable, we'll need to run the tests with sudo from .travis/dispatch.sh. Please put this change in a separate commit first to make sure it doesn't break anything else.

@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #476) made this pull request unmergeable. Please resolve the merge conflicts.

@mrobinson
Copy link
Member

Closing as homu is no more.

@mrobinson mrobinson closed this Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use separate homu user for Homu-related states
5 participants