Skip to content

Commit

Permalink
Merge pull request Normation#65 from nperron/bug_3633/dev/prevent_pos…
Browse files Browse the repository at this point in the history
…tinst_to_chmod_nonexistent_files

Fixes #3633 - Prevent rudder-agent postinst to chmod nonexistent files in /var/rudder/cfengine-community/ppkeys
  • Loading branch information
Nicolas PERRON committed Jun 4, 2013
2 parents ae8ff3a + a07490a commit 50a8f13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion rudder-agent/SPECS/rudder-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ CFRUDDER_FIRST_INSTALL=0
echo "Making sure that the permissions on the CFEngine key directory are correct..."
if [ -d %{ruddervardir}/cfengine-community/ppkeys ]; then
chmod 700 %{ruddervardir}/cfengine-community/ppkeys
chmod 600 %{ruddervardir}/cfengine-community/ppkeys/*
if [ `ls %{ruddervardir}/cfengine-community/ppkeys | wc -l` -gt 0 ]; then
chmod 600 %{ruddervardir}/cfengine-community/ppkeys/*
fi
fi

# Do this at first install
Expand Down
4 changes: 3 additions & 1 deletion rudder-agent/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ case "$1" in
echo "Making sure that the permissions on the CFEngine key directory are correct..."
if [ -d /var/rudder/cfengine-community/ppkeys ]; then
chmod 700 /var/rudder/cfengine-community/ppkeys
chmod 600 /var/rudder/cfengine-community/ppkeys/*
if [ `ls /var/rudder/cfengine-community/ppkeys | wc -l` -gt 0 ]; then
chmod 600 /var/rudder/cfengine-community/ppkeys/*
fi
fi

# Copy new binaries to workdir, make sure daemons are stopped first
Expand Down

0 comments on commit 50a8f13

Please sign in to comment.