view core/features.lua @ 14205:a874c3f4570a 13.0

util.startup: Always apply umask (thanks Max Hearnden) Commit c673ff1075bd removed mod_posix, and moved functionality into util.startup, including applying a secure umask at runtime. However, the new function was not called from the startup sequence, leading Prosody to run with whatever umask it inherited from the environment. Prosody Debian packages ship with a secure umask 027 in the systemd unit file for the prosody service, so Debian systems using systemd are not affected. prosodyctl calls the switch_user() function during startup, which would set the umask, so prosodyctl commands which created files were unaffected. This change makes both prosody and prosodyctl unconditionally set a secure umask during the startup process.
author Matthew Wild <mwild1@gmail.com>
date Thu, 28 May 2026 17:25:46 +0100
parents 569fae28a2f3
children cc406878209d 7eb0e47418ab
line wrap: on
line source

local set = require "prosody.util.set";

return {
	available = set.new{
		-- mod_bookmarks bundled
		"mod_bookmarks";
		-- mod_server_info bundled
		"mod_server_info";
		-- mod_flags bundled
		"mod_flags";
		-- mod_cloud_notify bundled
		"mod_cloud_notify";
		-- mod_muc has built-in vcard support
		"muc_vcard";
		-- mod_http_altconnect bundled
		"http_altconnect";
		-- Roles, module.may and per-session authz
		"permissions";
		-- prosody.* namespace
		"loader";
		-- "keyval+" store
		"keyval+";

		"s2sout-pre-connect-event";

		-- prosody:guest, prosody:registered, prosody:member
		"split-user-roles";

		-- new moduleapi methods
		"getopt-enum";
		"getopt-interval";
		"getopt-period";
		"getopt-integer";

		-- new module.ready()
		"module-ready";

		-- SIGUSR1 and 2 events
		"signal-events";
	};
};