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

Process: run process as another user #257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stdweird
Copy link
Member

@stdweird stdweird commented Nov 15, 2017

Fixes #253

@stdweird
Copy link
Member Author

This PR needs unittests, but i'm still thinking how to do them.
But the code was tested and works.

@stdweird
Copy link
Member Author

@ned21 feel free to review the code. i'll try to add unittests next week

src/main/perl/Process.pm Show resolved Hide resolved
src/main/perl/Process.pm Outdated Show resolved Hide resolved
src/main/perl/Process.pm Outdated Show resolved Hide resolved
@stdweird
Copy link
Member Author

@ned21 please rereview. tests fail, will be fixed later

@stdweird
Copy link
Member Author

stdweird commented Dec 1, 2017

tests are complete

jrha
jrha previously approved these changes Dec 19, 2017
@stdweird stdweird modified the milestones: 17.12, 18.3 Dec 21, 2017
@stdweird
Copy link
Member Author

@jrha i'm moving the milestone. we are seeing something odd, and at least the reporting needs refinement.

@jrha
Copy link
Member

jrha commented Feb 7, 2018

@stdweird any update on the strange behaviour?

@jrha
Copy link
Member

jrha commented Apr 3, 2018

@stdweird any update? Still seeing strangeness or is this now understood and ready for merging?

@stdweird stdweird modified the milestones: 18.3, 18.6 Apr 3, 2018
@stdweird
Copy link
Member Author

stdweird commented Apr 3, 2018

@jrha i didn't find the time yet to debug further. i moved the milestone.

@jrha
Copy link
Member

jrha commented Apr 3, 2018

👍

@jrha
Copy link
Member

jrha commented Jun 5, 2018

@stdweird got any further?

@stdweird
Copy link
Member Author

stdweird commented Jun 11, 2018

not really. sometimes, for whatever reason, the current GID is a single group; and in that case something goes wrong try to restore the group (looks like you can reduce the number of effective groups one is in)
eg. here the starting GID is 0 (normally it's a more than one group), and the resulting group

2018/06/05-10:24:23 [VERB] Got user id 163 (gid 163) (is_id 0 is_user 1)
2018/06/05-10:24:23 [VERB] Changing EGID from '0' to '163 163' with GID '0'
2018/06/05-10:24:23 [VERB] Changing EUID from '0' to 163 with UID 0
2018/06/05-10:24:25 [VERB] Restoring EUID from '163' to 0 with UID 0
2018/06/05-10:24:25 [ERROR] Something went wrong restoring EGID from '163 163' to '0' with GID '0 163': new EGID '0 163', no reason given

@jrha jrha modified the milestones: 18.6, 18.9 Jun 11, 2018
@jrha
Copy link
Member

jrha commented Jun 11, 2018

Hmm, odd.

@jrha jrha modified the milestones: 18.9, 18.12 Oct 10, 2018
@jrha jrha modified the milestones: 19.12, 20.2 Dec 11, 2019
@jrha
Copy link
Member

jrha commented Dec 11, 2019

Bumping this again, will see if I can take some time to look it more closely.

@jrha jrha modified the milestones: 20.3, 20.12 Mar 19, 2020
@jrha jrha modified the milestones: 24.6, 23.next Jun 23, 2023
@jrha jrha modified the milestones: 23.9, 23.next Sep 28, 2023
@jrha
Copy link
Member

jrha commented Sep 5, 2024

Rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

CAF::Process: Include an option to execute the command as an specific user
3 participants