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

Exit if uid=0, add --force flag to override #5179

Merged
merged 3 commits into from
Aug 22, 2019

Conversation

tstromberg
Copy link
Contributor

@tstromberg tstromberg commented Aug 22, 2019

New behavior:

sudo ./out/minikube start
😄  minikube v1.3.1 on Darwin 10.14.6
🛑  The virtualbox driver should not be used with root privileges.
💡  Tip: To remove this root owned cluster, run: sudo minikube delete
💣  Exiting

or:

sudo ./out/minikube start --force 
😄  minikube v1.3.1 on Darwin 10.14.6
⚠️  WARNING: The virtualbox driver should not be used with root privileges.
💿  Downloading VM boot image ...

Closes #3138
Obsoletes #5179

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 22, 2019
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 22, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tstromberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 22, 2019
@tstromberg
Copy link
Contributor Author

@minikube-bot OK to test

}

if d == constants.DriverNone || u.Uid != "0" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't this always exit, for driver none ? Or maybe that is the "happy path" of validateUser

Copy link
Collaborator

Choose a reason for hiding this comment

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

Never mind, the return will just go the same place as before (the checks were reversed)

@afbjorklund
Copy link
Collaborator

This might lead to some support issues, since configuration is unreadable (owned by root)

@tstromberg
Copy link
Contributor Author

This might lead to some support issues, since configuration is unreadable (owned by root)

Good point. Let me add something to detect if there is an existing config and offer up a solution.

@tstromberg tstromberg merged commit 15b3f21 into kubernetes:master Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minikube should fail early if executed as root
4 participants