| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: mwrock <matt@mattwrock.com>
|
|\
| |
| |
| |
| | |
MsysTechnologiesllc/Kapil/MSYS-1131_Retrieves_the_environment_variables_for_the_specified_user
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
|
| |
| |
| |
| | |
Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
|
| |
| |
| |
| |
| |
| | |
Use the latest and greatest ruby-isms to cut down on some code.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
| |
| |
| | |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|/
|
|
|
|
|
| |
not pulling in mixlib-log as a test dep, but just monkeypatching a trace
level into the ruby logger
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
| |
There is no guarantee that ENV["USER"] is always present, and in some
environments, it's not. Get the current user from Etc.getpwuid, which
works even in the absence of any environment variables.
Signed-off-by: Antonio Terceiro <asa@terceiro.xyz>
|
|
|
|
| |
Signed-off-by: Ryan Davis <zenspider@chef.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements correct quoting and escaping of arguments on windows.
That means that this works right now:
```ruby
filename = "c:\program files"
shell_out("dir", filename);
```
So all the defensive coding around quotes-around-filepaths -- which were
all actually buggy even when they worked (trailing backslashes would
fail) -- are unnecessary and arguments can just be passed in as an array
and this code will sort it out.
We rely on the existing determination of if metacharacters mean it needs
to run under cmd and if it needs the ^ quoting which seems to be well
tested, and which all runs after this does.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
|
|
|
|
|
|
| |
* Added username,password validation for elavated option
Signed-off-by: nimisha <nimisha.sharad@clogeny.com>
|
|
|
|
|
|
|
| |
In some cases the user running mixlib-shellout needs additional privileges, in
other cases the user we're trying to run the process as needs them.
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
|
|
|
|
| |
Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- mostly cleans up the windows specs so its easier to read the API
out of them and removes some of the very brittle internal testing
- refactors the 'which' logic a bit. trying to converge towards the
chef/chef version and eventually extracting common code so that
do not have to maintain 10+ slightly different copies everywhere.
- adds the Mixlib::ShellOut::EmptyWindowsCommand exception because
letting CreateProcessW throw a generic SystemCallError is pretty
much useless to everyone.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
|
|
|
|
| |
its just a collection of private methods, they should be private methods
retain a method in the class that was being used externally.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
|
|
|
|
| |
Signed-off-by: Tim Smith <tsmith@chef.io>
|
|
|
|
|
|
| |
Just removes some 1.9 logic from testing.
Signed-off-by: Tim Smith <tsmith@chef.io>
|
| |
|
| |
|
|
|
|
|
|
|
| |
by converting the hash keys to strings, we can use symbols in our
environment blocks:
environment {FOO: 'bar', SHELL: 'zsh'}
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This is breaking on windows with ruby 2.0.0p645. The issue
seems to be that there is something at the fd, but it's not
the file descriptor from the parent.
Instead, we're now testing that both the fd exists and
the file contains the contents that were written
|
| |
|
| |
|
|\
| |
| | |
with_logon now simulates login in unix
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added:
* Secondary groups from etc files
* Set environment variables like `su` would
* Set primary group to user's primary group if no other group specified
All only if `login` is set
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
| |
refelect that.
This fixes a spec that was broken on Windows by 767ea4fc19cb29a55a81a55d1a13643ae3108f4c
from PR https://github.com/opscode/mixlib-shellout/pull/58
It seems the Unix spec was updated to reflect this change, but the Windows was not
|
|\
| |
| | |
aix getpgid fails when called from parent and parent and child have different session
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
fixes travis failure that did not fail on my desktop
|
| |
| |
| |
| | |
now that we no longer support ruby 1.8.7 its time to retire this
|