Commit 7a66d735 authored by Romain Courteaud's avatar Romain Courteaud

Remove setuid bit on crontab.

parent c8fca4ed
...@@ -4,6 +4,13 @@ extends = ...@@ -4,6 +4,13 @@ extends =
parts = dcron-output parts = dcron-output
[dcron-hooks-download]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 860e914dff4108b47565965fe5ebc7b5
download-only = true
filename = dcron-hooks.py
[dcron-patch-nonroot] [dcron-patch-nonroot]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
md5sum = d5408ab682b65cc1eda40d588fcd7db8 md5sum = d5408ab682b65cc1eda40d588fcd7db8
...@@ -21,12 +28,13 @@ patches = ...@@ -21,12 +28,13 @@ patches =
patch-options = -p1 patch-options = -p1
make-options = make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_} PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
post-make-hook = ${dcron-hooks-download:location}/${dcron-hooks-download:filename}:post_make_hook
[dcron-output] [dcron-output]
# Shared binary location to ease migration # Shared binary location to ease migration
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
update-command = ${:command} update-command = ${:command}
command = ${coreutils-output:test} -x ${:crond} -a -x ${:crontab} command = ${coreutils-output:test} -x ${:crond} -a -x ${:crontab} -a ! -u ${:crontab}
crond = ${dcron:location}/sbin/crond crond = ${dcron:location}/sbin/crond
crontab = ${dcron:location}/bin/crontab crontab = ${dcron:location}/bin/crontab
import os
import shutil
def post_make_hook(options, buildout):
crontab_path = os.path.join(options['location'], 'bin', 'crontab')
os.chmod(crontab_path, 0750)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment