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

sudo-detection for target execution #1870

Merged
merged 1 commit into from
May 30, 2017
Merged

sudo-detection for target execution #1870

merged 1 commit into from
May 30, 2017

Conversation

arlimus
Copy link
Contributor

@arlimus arlimus commented May 30, 2017

When running inspec exec without the target option but against remote endpoints OR when executing it with the localhost:// target AND having --sudo active it would abort the execution. --target is a helper to set the Train parameters for backend, host, user, port, and potentially password. The detection would fail on providing any of these separately without specifying --target. The same holds true for the localhost train backend or just localhost:// target.

This type of detection has since moved to Train. The driving reason was to have this very useful check for localhost vs sudo run for any type of inspec (or for that matter: train) execution.

This PR depends on inspec/train#179 and the next release of train.

Strongly influenced by the original bugfix: #1741

Signed-off-by: Dominik Richter dominik.richter@gmail.com

Copy link
Contributor

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

That is a great improvement @arlimus

When running `inspec exec` without the `target` option but against remote endpoints OR when executing it with the `localhost://` target AND having `--sudo` active it would abort the execution. `--target` is a helper to set the Train parameters for `backend`, `host`, `user`, `port`, and potentially `password`. The detection would fail on providing any of these separately without specifying `--target`. The same holds true for the `localhost` train backend or just `localhost://` target.

This type of detection has since moved to Train. The driving reason was to have this very useful check for localhost vs sudo run for any type of inspec (or for that matter: train) execution.

This PR depends on inspec/train#179 and the next release of train.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
@chris-rock
Copy link
Contributor

Travis is having some issues today. I tested debian real quick locally.
screen shot 2017-05-30 at 6 18 49 pm

@chris-rock chris-rock merged commit 2dd0585 into master May 30, 2017
@chris-rock chris-rock deleted the dr/sudo-fx branch May 30, 2017 23:24
@chris-rock chris-rock restored the dr/sudo-fx branch May 30, 2017 23:27
@arlimus arlimus deleted the dr/sudo-fx branch May 31, 2017 03:22
@adamleff adamleff changed the title bugfix: sudo-detection for target execution sudo-detection for target execution May 31, 2017
@adamleff adamleff added the Type: Bug Feature not working as expected label May 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants