3e502866 | 20-Nov-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: use io.popen instead of pipes in shell for password
using echo in a sh(1) command line, requires many escaping to be done right, using io.popen we don't need to do this escaping anymore. |
e72457c4 | 30-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: tests: Cleanup
- Export NUAGE_FAKE_ROOTDIR only once - Use the header section of the test to require the root user - Use the PWD environment variable - Set the root/sys shell as /bin/sh -
nuageinit: tests: Cleanup
- Export NUAGE_FAKE_ROOTDIR only once - Use the header section of the test to require the root user - Use the PWD environment variable - Set the root/sys shell as /bin/sh - Use RFC 5737 reserved IP addresses
Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
show more ...
|
b9ce743c | 30-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Fix passwords
The hashed password usually contains a "$" sign, which, when used on a shell, must be escaped. Also, the plain text password may contain special characters that require esc
nuageinit: Fix passwords
The hashed password usually contains a "$" sign, which, when used on a shell, must be escaped. Also, the plain text password may contain special characters that require escaping.
Add a quick fix by enclosing it in single quotes. Note that if the plain text password contains a "'", it will still fail. This will be properly fixed in later commits.
Some here documents require the document to be a string literal, especially when passing invalid characters. Enclose it in single quotes.
Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
show more ...
|
945632ca | 30-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Standardize warning/error messages
Standardize the utilities from nuage.lua, to return nil on failure, plus an error message as a second result, and some value different from nil on succe
nuageinit: Standardize warning/error messages
Standardize the utilities from nuage.lua, to return nil on failure, plus an error message as a second result, and some value different from nil on success.
Make warnmsg() and errmsg() append "nuageinit: " by default. Pass an optional second parameter as false to avoid printing this tag.
Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
show more ...
|
9b2d92ad | 30-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Replace os.execute with Lua libraries
Prefer posix.sys.stat's chmod() to os.execute(). While here, change the name of the locals to be more descriptive.
Signed-off-by: Jose Luis Duran <
nuageinit: Replace os.execute with Lua libraries
Prefer posix.sys.stat's chmod() to os.execute(). While here, change the name of the locals to be more descriptive.
Signed-off-by: Jose Luis Duran <jlduran@gmail.com>
show more ...
|
8edd6c07 | 24-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Fix tests
Commit 07d17ca189fcf3cc44b7706040b05ca8135c3b85 set the recommended permissions for the SSH authorized keys file and directory. The tests, however, were failing on CI.
Use sta
nuageinit: Fix tests
Commit 07d17ca189fcf3cc44b7706040b05ca8135c3b85 set the recommended permissions for the SSH authorized keys file and directory. The tests, however, were failing on CI.
Use stat to check for the proper permissions.
Fixes: 07d17ca189f nuageinit: Set recommended SSH permissions Reported by: Jenkins
show more ...
|
07d17ca1 | 23-Jul-2024 |
Jose Luis Duran <jlduran@gmail.com> |
nuageinit: Set recommended SSH permissions
As stated in sshd(8), the recommended permissions for ~/.ssh are read/write/execute for the user, and not accessible by others; and the recommended permiss
nuageinit: Set recommended SSH permissions
As stated in sshd(8), the recommended permissions for ~/.ssh are read/write/execute for the user, and not accessible by others; and the recommended permissions for ~/.ssh/authorized_keys are read/write for the user, and not accessible by others.
show more ...
|
8d7331e6 | 05-Jun-2024 |
Baptiste Daroussin <bapt@FreeBSD.org> |
nuageinit: fix authorized_key test
After miss reading the cloudinit spec I ended up writting a wrong test for basic ssh key setup, nuageinit has been fixed, but not the test, here is the actual fix.
nuageinit: fix authorized_key test
After miss reading the cloudinit spec I ended up writting a wrong test for basic ssh key setup, nuageinit has been fixed, but not the test, here is the actual fix.
Reported by: markj
show more ...
|