Commit 910d0862 authored by Romain Courteaud's avatar Romain Courteaud

slapos.recipe.random: increase default password size to 16

parent 933d29c3
...@@ -119,7 +119,7 @@ class Password(object): ...@@ -119,7 +119,7 @@ class Password(object):
recipes like slapos.recipe.template:jinja2 to safely process the password. recipes like slapos.recipe.template:jinja2 to safely process the password.
Options: Options:
- bytes: password length (default: 8 characters) - bytes: password length (default: 16 characters)
- storage-path: plain-text persistent storage for password, - storage-path: plain-text persistent storage for password,
that can only be accessed by the user that can only be accessed by the user
(default: ${buildout:parts-directory}/${:_buildout_section_name_}) (default: ${buildout:parts-directory}/${:_buildout_section_name_})
...@@ -149,7 +149,7 @@ class Password(object): ...@@ -149,7 +149,7 @@ class Password(object):
if e.errno != errno.ENOENT: if e.errno != errno.ENOENT:
raise raise
if not passwd: if not passwd:
passwd = self.generatePassword(int(options.get('bytes', '8'))) passwd = self.generatePassword(int(options.get('bytes', '16')))
self.update = self.install self.update = self.install
options['passwd'] = passwd options['passwd'] = passwd
# Password must not go into .installed file, for 2 reasons: # Password must not go into .installed file, for 2 reasons:
......
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