Commit 77df500a authored by Jérome Perrin's avatar Jérome Perrin

proftpd: drop workaround now that userinfo fix is released

/reviewed-on !504
parent 284719a5
...@@ -19,7 +19,7 @@ md5sum = 8ed5b4a7940db47ccb386c2f4e3e7273 ...@@ -19,7 +19,7 @@ md5sum = 8ed5b4a7940db47ccb386c2f4e3e7273
[instance-default] [instance-default]
filename = instance-default.cfg.in filename = instance-default.cfg.in
md5sum = e2e67390753ec63babcc8d4ce9fc6230 md5sum = 4cba10d2e9fc4b17c73c78bde0bcb86c
[proftpd-config-file] [proftpd-config-file]
filename = proftpd-config-file.cfg.in filename = proftpd-config-file.cfg.in
......
...@@ -90,23 +90,10 @@ port = ${proftpd:sftp-port} ...@@ -90,23 +90,10 @@ port = ${proftpd:sftp-port}
# command line to add a user, invoke with: # command line to add a user, invoke with:
# ftpasswd --name=bob # ftpasswd --name=bob
# to prompt for password, or --stdin to read password from stdin # to prompt for password, or --stdin to read password from stdin
recipe = slapos.recipe.template:jinja2 recipe = slapos.cookbook:wrapper
mode = 0700 wrapper-path =${buildout:bin-directory}/${:_buildout_section_name_}
extensions = jinja2.ext.do command-line =
rendered = ${buildout:bin-directory}/${:_buildout_section_name_} {{ perl_bin }} {{ ftpasswd_bin }} --passwd --home=${proftpd:data-dir} --shell=/bin/false --uid=${proftpd-userinfo:pw-uid} --gid=${proftpd-userinfo:gr-gid} --file ${auth-user-file:output}
wrapper-path = ${:rendered}
# XXX: to workaround bug that pw-uid and gr-gir slapos.cookbook:userinfo cannot
# be used in a buildout part (as they are returned as int and not strings), we
# use slapos.recipe.template:jinja2 and not a simple slapos.cookbook:wrapper,
# because only the former is compatible with userinfo.
# Because we are already in a jinja template, we have to escape jinja template
# with {% raw %} / {% endraw %}
template = inline:
#!/bin/bash
{{ perl_bin }} {{ ftpasswd_bin }} --passwd --home=${proftpd:data-dir} --shell=/bin/false --uid={% raw %}{{ pw_uid }} --gid={{ gr_gid }}{% endraw %} --file ${auth-user-file:output} $@
context =
key pw_uid proftpd-userinfo:pw-uid
key gr_gid proftpd-userinfo:gr-gid
[auth-user-file] [auth-user-file]
recipe = plone.recipe.command recipe = plone.recipe.command
......
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