Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
aa525b9c
Commit
aa525b9c
authored
Apr 12, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
soft
parent
7744dbda
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
6 deletions
+42
-6
software/proftpd/buildout.hash.cfg
software/proftpd/buildout.hash.cfg
+1
-1
software/proftpd/instance-default.cfg.in
software/proftpd/instance-default.cfg.in
+36
-2
software/proftpd/instance-output-schema.json
software/proftpd/instance-output-schema.json
+4
-2
software/proftpd/software.cfg
software/proftpd/software.cfg
+1
-1
No files found.
software/proftpd/buildout.hash.cfg
View file @
aa525b9c
...
@@ -20,7 +20,7 @@ md5sum = 8ed5b4a7940db47ccb386c2f4e3e7273
...
@@ -20,7 +20,7 @@ md5sum = 8ed5b4a7940db47ccb386c2f4e3e7273
[instance-default]
[instance-default]
filename = instance-default.cfg.in
filename = instance-default.cfg.in
md5sum =
d9598ff3445cc061e83c436f3ad5d2b3
md5sum =
1ecbd64fbd402855b192ba3420fd71ca
[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 @
aa525b9c
...
@@ -47,6 +47,7 @@ path = ${directory:promise}/${:_buildout_section_name_}
...
@@ -47,6 +47,7 @@ path = ${directory:promise}/${:_buildout_section_name_}
[proftpd-userinfo]
[proftpd-userinfo]
recipe = slapos.cookbook:userinfo
recipe = slapos.cookbook:userinfo
[proftpd-password]
[proftpd-password]
recipe = slapos.cookbook:generate.password
recipe = slapos.cookbook:generate.password
username = proftpd
username = proftpd
...
@@ -82,11 +83,42 @@ hostname = ${proftpd:ipv6}
...
@@ -82,11 +83,42 @@ hostname = ${proftpd:ipv6}
port = ${proftpd:sftp-port}
port = ${proftpd:sftp-port}
[ftpasswd-bug]
# command line to add a user, invoke with:
# ftpasswd --name=bob
# to prompt for password, or --stdin to read password from stdin
recipe = slapos.cookbook:wrapper
wrapper-path = ${buildout:bin-directory}/${:_buildout_section_name_}
command-line =
{{ 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}
[ftpasswd]
# command line to add a user, invoke with:
# ftpasswd --name=bob
# to prompt for password, or --stdin to read password from stdin
recipe = slapos.recipe.template:jinja2
mode = 0700
extensions = jinja2.ext.do
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
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
output = ${directory:etc}/ftpd.passwd
output = ${directory:etc}/ftpd.passwd
command =
command =
echo ${proftpd-password:passwd} |
{{ ftpasswd_bin }} --stdin --passwd --name=${proftpd-password:username} --home=${proftpd:data-dir} --shell=/bin/false --uid=`id -u` --gid=`id -g` --file ${:output}
echo ${proftpd-password:passwd} |
${ftpasswd:wrapper-path} --name=${proftpd-password:username} --stdin
update-command = ${:command}
update-command = ${:command}
...
@@ -112,13 +144,15 @@ context =
...
@@ -112,13 +144,15 @@ context =
section proftpd proftpd
section proftpd proftpd
key slapparameter_dict slap-configuration:configuration
key slapparameter_dict slap-configuration:configuration
[promises]
[promises]
recipe =
recipe =
instance-promises =
instance-promises =
${proftpd-listen-promise:path}
${proftpd-listen-promise:path}
[publish-connection-parameter]
[publish-connection-parameter]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
url = ${proftpd:url}
url = ${proftpd:url}
user = ${proftpd-password:username}
user
name
= ${proftpd-password:username}
password = ${proftpd-password:passwd}
password = ${proftpd-password:passwd}
software/proftpd/instance-output-schema.json
View file @
aa525b9c
...
@@ -10,11 +10,13 @@
...
@@ -10,11 +10,13 @@
},
},
"username"
:
{
"username"
:
{
"description"
:
"Default username"
,
"description"
:
"Default username"
,
"type"
:
"string"
"type"
:
"string"
,
"optional"
:
true
},
},
"password"
:
{
"password"
:
{
"description"
:
"Password for default username"
,
"description"
:
"Password for default username"
,
"type"
:
"string"
"type"
:
"string"
,
"optional"
:
true
}
}
},
},
"type"
:
"object"
"type"
:
"object"
...
...
software/proftpd/software.cfg
View file @
aa525b9c
...
@@ -37,7 +37,7 @@ context =
...
@@ -37,7 +37,7 @@ context =
key ftpasswd_bin proftpd-output:ftpasswd
key ftpasswd_bin proftpd-output:ftpasswd
key ftpdctl_bin proftpd-output:ftpdctl
key ftpdctl_bin proftpd-output:ftpdctl
key ssh_keygen_bin openssh-output:keygen
key ssh_keygen_bin openssh-output:keygen
key perl_bin
openssh-output:keygen
key perl_bin
proftpd-output:perl
[versions]
[versions]
...
...
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