-
Notifications
You must be signed in to change notification settings - Fork 225
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
remove "cant find escaltion tool if user is already root #816
Comments
Linutil should not be ran as root. Will add restriction to prevent running as root. |
how should i make my docker container not log me in as root? |
You can specify a new user in the docker file and run it with |
I mean, we could make this work with a superuser check and setting |
There might be some other issues if relative dirs (besides those referencing the common utility scripts)* are used in any of the scripts, but that's generally discouraged anyways |
All scripts would also need to be updated to not quote the escalation tool variable in that case, since otherwise they'd be attempting launch a binary with an empty name in your PATH, which obviously cannot exist. |
That could get quickly solved by redirecting to a custom escalation function that can implement the branching logic to check for the root user case. Would be as simple as implementing the fn in |
elevated_execution() {
if [ -z "$ESCALATION_TOOL" ]; then
"$@"
else
"$ESCALATION_TOOL" "$@"
fi
} Need to replace every Is this simple function good in |
Nice! Yeah, that's exactly what I'm thinking. I'd probably use a |
Yeah was thinking of same idea |
You'll need to remove the quotes from |
Quoting |
Describe the bug
log in as root user without a escation tool, eg docker
To Reproduce
Steps to reproduce the behavior:
run the script
select an opetion which requires elevation
Expected behavior
the script to run normal
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Checklist
The text was updated successfully, but these errors were encountered: