HomePhorge

(maint) Allow non-root users to traverse tmpdir
762217029fd2Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(maint) Allow non-root users to traverse tmpdir

This test creates a tmpdir, initially owned by root:root and mode 0700,
and executes puppet agent with an ssldir contained within the tmpdir:

puppet agent --ssldir /tmp/autosign_command.XXXX/ssldir-autosign

Puppet will manage the owner/group/mode of the ssldir (but not its
parent) by temporarily switching uid/gid to the puppet user & group,
create the directory, etc, and then switch back. If the parent
directory has mode 0700, then the puppet user is not allowed to create
a directory within the parent.

Previously, the test used puppet apply to switch the owner and mode of
the parent directory. This works by accident on some platforms, e.g.
Windows, because there is a setup step that will create the puppet
user and group.

But in PE, that is not the case, so this test would fail in PE on
Windows with the error:

Could not write /tmp/autosign_command.jwi1dW/ssldir-autosign/\
  private_keys/hj6ml6atya3wuiz.delivery.puppetlabs.net-autosign.pem \
  to privatekeydir: Permission denied

This commit modifies the test to allow group and other read and
traverse permissions on the parent directory, and doesn't require the
existence of the puppet user.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUb8d94fd9041d: Merge pull request #3330 from MikaelSmith/bug/master/PUP-1802-update-p4tw
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPU762217029fd2: (maint) Allow non-root users to traverse tmpdir (authored by Josh Cooper <josh@puppetlabs.com>).Nov 26 2014, 12:47 AM