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

Discussion: enable mixlib-shellout's login mode for execute/script resources #4338

Closed
coderanger opened this issue Dec 22, 2015 · 7 comments
Closed
Labels

Comments

@coderanger
Copy link
Contributor

So this came up again today and I hadn't seen a discussion on it before. Should we enable the login flag? Mostly I care about fixing $HOME when a user is set, and then $PATH munging that gets turned on seems counterproductive but we should probably do something.

@webframp
Copy link
Contributor

Amazingly, I just bumped into this today as well with chef-client 12.6 on Windows. Hackish and incomplete, but this got the job done for me: master...webframp:execute-credentials

coderanger added a commit to poise/poise that referenced this issue Dec 30, 2015
…ault group.

This should get backported to Chef I think: chef/chef#4338
It's a more grokkable set of default behaviors.

/cc @chef/client-core
@coderanger
Copy link
Contributor Author

I put up my own version of this in poise/poise@aaf2e53 along with setting the user's default group if possible.

/cc @chef/client-core

@lamont-granquist
Copy link
Contributor

we definitely meant to get that kind of functionality exposed in the resources.

@webframp
Copy link
Contributor

I assumed it was just an oversight, since the mixlib-shellout behavior is there.

As to the correct way to implement it, I have no attachment to the code I started working on and would just like to see it supported on the appropriate providers

@coderanger
Copy link
Contributor Author

I think the two things we need to change before enabling this more globally would be to change the $PATH fixes to be an append instead of an overwrite, and add setting at least $HOME and $USER to the Windows backend too. Also the code in ShellOut#gid needs a guard to work on Windows, right now that will throw a nil-NoMethodError.

@lamont-granquist
Copy link
Contributor

calling this one a dup of #3563

@lock
Copy link

lock bot commented Oct 15, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants