Skip to content

run-userchroot: Support changing user and group via sudo

Zehao Chen requested to merge zchen723/run-userchroot-sudo into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

Support specifying a user and/or a group for buildbox-run-userchroot.

This adds the flexibility when buildbox-worker and userchroot need to run as different users with different permissions.

Refactoring

  • Move Credentials struct from casd to common and rename it to ProcessCredentials for clarity

Follow up work in future MR(s)

  • Update CASClient to include the overridden uid and gid when requesting LocalCAS to stage directory
Edited by Zehao Chen

Merge request reports