Mercurial > prosody-hg
view COPYING @ 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 | 3ce3633527af |
| children |
line wrap: on
line source
All source code in this project is released under the below MIT license. Some components are not authored by the Prosody maintainers, but such code is itself either released under a MIT license or declared public domain. --- Copyright (C) 2008-2022 Matthew Wild Copyright (C) 2008-2020 Waqas Hussain Copyright (C) 2010-2022 Kim Alvefur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- util-src/encodings.c: Parts included from Lua 5.3. Copyright (C) 1994-2015 Lua.org, PUC-Rio. util-src/signal.c: Copyright (C) 2007 Patrick J. Donnelly (batrick@batbytes.com) See full copyright notice in the source file. util-src/struct.c: Copyright (C) 2010-2018 Lua.org, PUC-Rio. All rights reserved. See full copyright notice in the source file. net/dns.lua: public domain 20080404 lua@ztact.com
