opnsense-src/libexec/nuageinit/tests
Baptiste Daroussin 2ebec3c7ea nuageinit: fix command injection and related issues
- Add shell_escape() helper to safely escape shell arguments
- Apply shell_escape to all user-controlled values in shell commands:
  adduser (usershow, useradd, lock, primary_group, groups)
  addgroup (groupshow, groupadd, members)
  exec_change_password (usermod)
  settimezone (tzsetup root and timezone)
  install_package (pkg package names)
- Escape double quotes in hostname when writing rc.conf.d/hostname
- Add missing 'local' declaration for resolvconf_command in nameservers()
- Escape interface name in resolvconf -a command
- Change open_resolvconf_conf() from 'w' to 'a' mode to prevent
  data loss when nameservers() is called multiple times
- Clean up stale resolvconf.conf at the start of each boot
  (skip on postnet to preserve config written by first call)

Approved by:	re (cperciva)
MFC After: 1 day

(cherry picked from commit 8b70a203be10411c560ed303ab25713d70b316e9)
(cherry picked from commit 87b18b611ec9a70347fdd239345fa23977bcb2d0)
2026-05-14 12:06:56 -07:00
..
addfile.lua nuageinit: Silence luacheck warnings and fix typos 2025-11-25 00:39:15 +00:00
addgroup.lua nuageinit: Lua check and lint files 2024-09-26 12:58:00 +02:00
addsshkey.lua nuageinit: Lua check and lint files 2024-09-26 12:58:00 +02:00
adduser.lua nuageinit: Lua check and lint files 2024-09-26 12:58:00 +02:00
adduser_passwd.lua nuageinit: add test about encrypted passwords 2024-11-20 11:02:55 +01:00
dirname.lua nuageinit: Lua check and lint files 2024-09-26 12:58:00 +02:00
err.lua nuageinit: Lua check and lint files 2024-09-26 12:58:00 +02:00
Makefile nuageinit: Improvements for nuageinit 2025-08-22 14:40:36 -04:00
Makefile.depend Update Makefile.depend files 2024-10-14 10:26:17 -07:00
nuage.sh nuageinit: Add me to copyright list 2025-09-17 21:33:57 +02:00
nuageinit.sh nuageinit: fix command injection and related issues 2026-05-14 12:06:56 -07:00
sethostname.lua nuageinit: Lua check and lint files 2024-09-26 12:58:00 +02:00
settimezone.lua nuageinit: Improvements for nuageinit 2025-08-22 14:40:36 -04:00
utils.sh nuageinit: Add me to copyright list 2025-09-17 21:33:57 +02:00
warn.lua nuageinit: Lua check and lint files 2024-09-26 12:58:00 +02:00