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

uid in chroot context #6

Closed
yotamr opened this issue Jul 27, 2012 · 3 comments
Closed

uid in chroot context #6

yotamr opened this issue Jul 27, 2012 · 3 comments

Comments

@yotamr
Copy link
Collaborator

yotamr commented Jul 27, 2012

When running dwight through sudo, the uid in the chroot environment is 0 as well. It's desirable to have dwight command run in the same context of the calling user. I don't have a clean solution, here are some ideas:

  1. Since most dwight invocations are through sudo, dwight can use the SUDO_UID environment variable to setuid() to the original user and setuid(getuid()) in case $SUDO_UID doesn't exist
  2. setuid the Python interpreter - probably a bad idea.
@vmalloc
Copy link
Owner

vmalloc commented Jul 27, 2012

I like the SUDO_UID option better. I can also provide an option to specify the uid just in case.

@yotamr
Copy link
Collaborator Author

yotamr commented Jul 28, 2012

Is the guid also handled in a similar fashion?

@vmalloc vmalloc reopened this Jul 28, 2012
@vmalloc
Copy link
Owner

vmalloc commented Jul 28, 2012

Nope - I forgot to add the GID option - adding it now.

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

No branches or pull requests

2 participants