<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/nuageinit/tests/sethostname.lua, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>http://cgit.freebsd.org/src/atom?h=main</id>
<link rel='self' href='http://cgit.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<updated>2026-06-09T16:04:24Z</updated>
<entry>
<title>nuageinit: use single-quote shell escaping for hostname in rc.conf.d</title>
<updated>2026-06-09T16:04:24Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2026-06-09T14:04:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=da3890fdccfa7d540ea746182248299b81f95345'/>
<id>urn:sha1:da3890fdccfa7d540ea746182248299b81f95345</id>
<content type='text'>
The hostname value was written inside double quotes in
/etc/rc.conf.d/hostname. POSIX shell performs command substitution
inside double quotes, so a hostname containing $() or backticks would
be executed when the file is sourced (e.g., by rc(8)).

Switch to using the existing shell_escape() helper, which wraps values
in single quotes. In POSIX shell, single-quoted strings are completely
literal — no expansion or substitution of any kind is performed.

While the hostname is already validated to contain only
[a-zA-Z0-9.-], this change provides defense-in-depth so the output
format is safe regardless of future validation changes.

Reported by:	Yazdan Soltani &lt;yazdan.soltani@gmail.com&gt;
</content>
</entry>
<entry>
<title>nuageinit: add hostname validation (RFC 952/1123) to sethostname()</title>
<updated>2026-06-04T18:26:49Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2026-06-04T18:26:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=46d1758aa7a2af37a356a93812b492a406c6ffd4'/>
<id>urn:sha1:46d1758aa7a2af37a356a93812b492a406c6ffd4</id>
<content type='text'>
Validate hostnames before writing them:
- Reject empty hostnames
- Reject hostnames longer than 253 characters
- Reject hostnames with invalid characters
- Reject hostnames starting or ending with dot/hyphen
- Reject labels longer than 63 characters
- Reject labels starting or ending with hyphen

Expand the sethostname test to cover all rejection cases.
Update nuage.sh sethostname_body to ignore stderr (warnings).
</content>
</entry>
<entry>
<title>nuageinit: Lua check and lint files</title>
<updated>2024-09-26T10:58:00Z</updated>
<author>
<name>Jose Luis Duran</name>
<email>jlduran@gmail.com</email>
</author>
<published>2024-07-29T18:40:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=504981357aa36365784458cfe8d9e23097bfac7b'/>
<id>urn:sha1:504981357aa36365784458cfe8d9e23097bfac7b</id>
<content type='text'>
Mostly white space, style, and luacheck compliance.

Signed-off-by: Jose Luis Duran &lt;jlduran@gmail.com&gt;
</content>
</entry>
<entry>
<title>nuageinit: add basic support for cloudinit.</title>
<updated>2024-03-15T08:22:16Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2022-11-23T19:00:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a42d6f76018e4ed8324e319ab48aac904bda437c'/>
<id>urn:sha1:a42d6f76018e4ed8324e319ab48aac904bda437c</id>
<content type='text'>
this is a very early script to support cloudinit, it does not intend to
be a full featured cloudinit client, but will support a good enough
subset to be viable in most case.

It support nocloud and openstack config-2 config drive mode (iso9660 or
msdosfs)

The following features are currently supported:
- adding users (including a default user named 'freebsd' with password
  'freebsd'
- adding groups
- adding ssh keys
- static ipv4, static ipv6, dynamic ipv4

With this one is able to use the 'bring your own image feature" out of
box.

It is expected that the script grows the support of other clouds
supporting cloud-init, contributions are welcomed.

It is designed to be only run once via the firstboot mecanism.

Sponsored by:	OVHCloud
MFC After:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D44141
</content>
</entry>
</feed>
