Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos
Commits
77df500a
Commit
77df500a
authored
Jan 18, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proftpd: drop workaround now that userinfo fix is released
/reviewed-on
nexedi/slapos!504
parent
284719a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
18 deletions
+5
-18
software/proftpd/buildout.hash.cfg
software/proftpd/buildout.hash.cfg
+1
-1
software/proftpd/instance-default.cfg.in
software/proftpd/instance-default.cfg.in
+4
-17
No files found.
software/proftpd/buildout.hash.cfg
View file @
77df500a
...
@@ -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
...
...
software/proftpd/instance-default.cfg.in
View file @
77df500a
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment