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

salt/master: chdir to root not homedir #27092

Merged
merged 1 commit into from Sep 15, 2015

Conversation

perfinion
Copy link
Contributor

This is a backport of #27091 to the stable branch since there are minor changes so the same patch does not automatically apply to both.

The pre-flight checks try to change to $HOME, this can fail for multiple
reasons. One such case is that /root is a protected dir under SELinux
which the master should not have access to. The daemon should instead
change to the root dir which is the only dir that is always guaranteed
to be there. The limited testing I have managed to do shows that windows
accepts the '/' path too just fine so the os-specific case is not
required either.

Changing to $HOME was added in #21279

Gentoo-Bug: https://bugs.gentoo.org/560300

The pre-flight checks try to change to $HOME, this can fail for multiple
reasons. One such case is that /root is a protected dir under SELinux
which the master should not have access to. The daemon should instead
change to the root dir which is the only dir that is always guaranteed
to be there. The limited testing I have managed to do shows that windows
accepts the '/' path too just fine so the os-specific case is not
required either.
@jfindlay jfindlay added Core relates to code central or existential to Salt Medium Change labels Sep 13, 2015
@cachedout
Copy link
Contributor

I would like to see how the full test run shakes out on #27091 before we merge this. Should be in the next day or so. Thanks!

@perfinion
Copy link
Contributor Author

sounds good to me, thanks.
it should work on windows since cmd.exe accepts "cd /" but always good to confirm and I do not have any windows machines to test it on

cachedout pushed a commit that referenced this pull request Sep 15, 2015
salt/master: chdir to root not homedir
@cachedout cachedout merged commit 100e340 into saltstack:2015.8 Sep 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core relates to code central or existential to Salt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants