| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We create temporary files in /tmp/ with predictable names. These
could be used by an attacker to DoS a box by setting a symlink to
some other file (say, /etc/shadow) and waiting for us to overwrite
it.
The minimalistic solution employed by this patch is to wrap all such
file writing with a paranoid wrapper that:
1) Check to see if the target exists
2) Issues a warning if it was a symlink
3) Deletes it
4) Waits (0.1 seconds if it was a file, 5 seconds if it was a symlink)
5) Opens the file with EXCL, which will fail if the file has come back.
If this succeeds (as it normally will) it has exactly the same semantics
as the original code (a must, as we are right at a release boundary).
However, under no circumstances will it follow a preexisting symlink (the
operating system guarantees this with EXCL) so the danger of an exploit
has been converted into the possibility of a failure, with an appropriate
warning.
|
|
|
|
|
|
| |
Closing stdout and stderr would sometimes cause failures when a program
that is executed with squelched output tries to write to them. This
reverts to the previous behavior of reopening them to /dev/null.
|
|
|
|
|
|
| |
This solves some SELinux issues with programs such as mount being denied
from writing to temporary files and removes a race condition with
temporary file creation.
|
|
|
|
|
|
| |
Due to problems introduced on HP-UX (See #2997)
This reverts commit 6ab2453d966d1d48e12d8a8cec34b9e460597d04.
|
|
|
|
|
|
|
|
|
|
| |
In some cases communicating with child processes via temprary files is not
viable. This is Ricky Zhou's patch from the ticket, which solves the problem
by using the more normal system of pipes. It is a broader reaching change
than suggested by the ticket (it affects all execs, not just SELinux) but IMHO
is the right way to go.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
|
|
| |
Patch thanks to Till Maas
Signed-off-by: James Turnbull <james@lovedthanlost.net>
|
|
|
|
| |
are looking for a binary
|
|
|
|
|
|
|
|
|
| |
Ruby 1.8.1 can not parse the yanl produced by later versions because
it requires explict type tagging of symbols. This patch adds the
tagging on to later versions so that mixed version instalations can
use yaml.
Signed-off-by: Markus Roberts <Markus@reality.com>
|
|
|
|
| |
Signed-off-by: Marc Fournier <marc.fournier@camptocamp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
For too long we have refused to change users
on Darwin because a long time ago the ruby they
shipped with was really, really broken.
It's been fixed for a while, so this just removes
the restriction.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
This moves the locking code out of Puppet::Util into a
separate module, to make the code cleaner.
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
| |
|
|
|
|
| |
whether stderr and stdout are combined in the output
|
|
|
|
| |
Signed-off-by: Luke Kanies <luke@madstop.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
any local variables and added a local variable -- see
http://snurl.com/21zf8. My own testing showed that this
caused memory growth to level off at a reasonable level.
Note that the link above says the problem is only with class
methods, but my own testing showed that it's any method that
meets these criteria. This is not a functional change, but
should hopefully be the last nail in the coffin of #1131.
|
| |
|
|
|
|
| |
to convert the interpreter to use SimpleNode objects, then continue with the Configuration object.
|
|
|
|
|
|
| |
the child process time to write
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2717 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2712 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
call to Process.setsid after the fork, and I chdir'd to /.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2711 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2703 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2605 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
client hanging problems.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2604 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
the inspection of it
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2557 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
that the output that comes back is more easily parsed, without needing to understand all sorts of foreign languages
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2456 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
all true cases, and the provider tests were poorly written and missed it.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2427 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into source:trunk
Generated with
svn merge -r 2378:HEAD https://reductivelabs.com/svn/puppet/branches/execute-refactor trunk
CHANGES:
- Puppet::Util#execute now takes hash key/value pairs as arguments after the command array.
- Processes executed from the base service provider are now silenced. That is, their
standard input, output, and error pipes are all directed to /dev/null.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2385 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2318 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
to exec(). I am hoping this will fix the many problems people are having with processes hanging around (e.g., #509). This change just removes the attempts at closing TCPServer instances, which should now be fixed from using exec instead of system.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2297 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
least on my os x box.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2284 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
up the top-level namespace a bit. This is a lot of file modifications, but most of them just change class names and file paths.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2178 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2124 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2120 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2119 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1980 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
pass arrays to execute() instead of strings, which means that the vast majority of execution problems are now gone. I will finish testing tomorrow, hopefully, and will also hopefully be able to verify that the execution-related bugs are fixed.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1979 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1963 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
but it is much better. There is still plenty of bug-fixing to do on other platforms, I expect.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1954 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1941 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
there are not yet sufficient tests for it, so I will leave the bug open until we have got the new work in place. I also added a "rails" feature, so I do not have to keep testing whether ActiveRecord is defined.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1911 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
thinking about how to fix them. Stupid /etc/services.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1863 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
development in the trunk again, except for larger changes, which will still get their own branch. This is a merge of the changes from revision 1826 to revision 1834.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1835 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
missing server, puppet was just exiting.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1785 980ebf18-57e1-0310-9a29-db15c13687c0
|