aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | mod_blocklist: Check JID of mediated MUC invite sender against blocklistMatthew Wild2024-04-221-1/+16
| | | | | | | | | | This ensures that someone on your blocklist is unable to invite you to MUC rooms.
* | mod_saslauth: Log when tls-exporter is NOT supported, as well as when it isMatthew Wild2024-04-171-0/+2
| |
* | net.unbound: Show canonical name in textual format (e.g. in shell)Kim Alvefur2024-04-141-1/+5
| | | | | | | | | | | | | | libunbound does not tell us the whole chain of CNAMEs, only the final canonical name. This is to aid in debugging since it will only be shown in the shell.
* | mod_http_file_share: Fix expiry disabled check for new config APIKim Alvefur2024-04-081-1/+1
| | | | | | | | Similar to 26c30844cac6
* | util.startup: Fix notifying config-reload to systemdKim Alvefur2024-04-081-1/+1
| | | | | | | | Does this event name seem backwards to anyone else?
* | mod_version: Fix uname result style (thanks riau)Kim Alvefur2024-04-071-3/+3
| | | | | | | | `result[, err]`, not `ok, err|result`, must have confused it with pcall
* | mod_server_contact_info: Sort form fields to please scansionKim Alvefur2024-04-061-1/+2
| | | | | | | | | | The unstable hash table order caused the tests to fail and I don't know how to tell scansion to ignore the order.
* | mod_version: Handle access denied from uname()Kim Alvefur2024-04-061-1/+6
| | | | | | | | | | Discovered while experimenting with a stricter SystemCallFilter setting See man:systemd.exec(5)
* | mod_admin_shell: Add connection created timeaidan2024-04-031-0/+12
| | | | | | | | | | | | This adds an output format option to show the time that the connection was created. Ref #1852
* | Merge 0.12->trunkKim Alvefur2024-04-041-2/+2
|\|
| * mod_invites_adhoc: Fix result form type (thanks betarays)Kim Alvefur2024-04-041-2/+2
| |
* | util.startup: Support systemd Type=notify service typeKim Alvefur2024-04-042-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | This lets Prosody report its lifecycle status to systemd, so it knows when Prosody has completed its startup, when it's reloading and shutting down. Both Type=notify and Type=notify-reload is supported Example systemd .service configuration snippet: [Service] Type=notify
* | MUC: Fix legacy hats (thanks nicoco)Kim Alvefur2024-03-281-2/+8
| | | | | | | | Why do we not have tests for this?
* | MUC: Switch to official XEP-0317 namespace for Hats (including compat) ↵Kim Alvefur2024-03-282-3/+12
| | | | | | | | (thanks nicoco)
* | util.startup: Fix exiting on pidfile troubleKim Alvefur2024-03-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | prosody.shutdown() relies on prosody.main_thread, which has not been set yet at this point. Doing a clean shutdown might actually be harmful in case it tears down things set up by the conflicting Prosody, such as the very pidfile we were looking at. Thanks again SigmaTel71 for noticing
* | Merge 0.12->trunkMatthew Wild2024-03-271-0/+51
|\|
| * prosodyctl check: Warn about invalid domain names in the config fileMatthew Wild2024-03-271-0/+51
| | | | | | | | | | This ensures that domain names of virtual hosts and components are valid in XMPP, and that they are encoded correctly.
* | util.startup: Abort before initialization of logging when started as rootKim Alvefur2024-03-241-3/+3
| | | | | | | | | | Prevents creation of log files owned by the root user which could be inaccessible once started correctly.
* | util.startup: Don't use not yet existent shutdown procedure when started as ↵Kim Alvefur2024-03-241-1/+1
| | | | | | | | root (thanks SigmaTel71)
* | util.startup: Check root after detecting platform and reading config (thanks ↵Kim Alvefur2024-03-241-1/+1
| | | | | | | | | | | | | | | | SigmaTel71) Ensures that startup.detect_platform() runs so know whether to use the POSIX method of checking the current user or something else. Also after reading the config so we know whether the root override setting is set.
* | mod_posix: Move everything to util.startupKim Alvefur2024-03-232-121/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows greater control over the order of events. Notably, the internal ordering between daemonization, initialization of libunbound and setup of signal handling is sensitive. libunbound starts a separate thread for processing DNS requests. If this thread is started before signal handling has been set up, it will not inherit the signal handlers and instead behave as it would have before signal handlers were set up, i.e. cause the whole process to immediately exit. libunbound is usually initialized on the first DNS request, usually triggered by an outgoing s2s connection attempt. If daemonization happens before signals have been set up, signals may not be processed at all.
* | mod_bosh: Set base_type on sessionMatthew Wild2024-03-171-1/+1
| | | | | | | | | | This fixes a traceback with mod_saslauth. Ideally we move this to util.session at some point, though.
* | util.startup: Back out 598df17b8ebbKim Alvefur2024-03-101-1/+1
| | | | | | | | | | | | | | | | Broke signal handling again, such that an early s2s connection results in libunbound catching signals and getting Prosody killed on e.g. SIGHUP This returns to the situation where prosody --daemonize does not respond to signals.
* | util.startup: Hook signals after daemonizationKim Alvefur2024-03-061-1/+1
| | | | | | | | | | | | signalfds stop working with epoll after forking hooking signals later should not affect anything
* | mod_pubsub: Ignore shadowed variable [luacheck]Kim Alvefur2024-03-061-0/+1
| |
* | mod_pubsub: Add shell commands to create and list nodesMatthew Wild2024-03-061-0/+42
| |
* | core.features: Advertise that events are fired for SIGUSR1/2Kim Alvefur2024-03-021-0/+3
| | | | | | | | Moved here from mod_posix since these events no longer originate there
* | util.startup: Fix firing of USR1/2 eventsKim Alvefur2024-03-021-2/+2
| |
* | net.server: Restore epoll signalfd handlingKim Alvefur2024-03-021-5/+0
| | | | | | | | Reverts 4a9a69659727
* | mod_posix: Move POSIX signal handling into util.startup to avoid raceKim Alvefur2024-03-022-50/+43
| | | | | | | | | | | | | | | | | | | | When libunbound is initialized, it spawns a thread to work in. In case a module initializes libunbound, e.g. by triggering a s2s connection, Prosody would not handle signals, instead immediately quit on e.g. the reload (SIGHUP) signal. Likely because the libunbound thread would not have inherited the signal mask from the main Prosody thread. Thanks Menel, riau and franck-x for reporting and help narrowing down
* | net.server: Disable epoll signalfd handling by default until problems resolvedKim Alvefur2024-03-011-0/+5
| |
* | net.server_epoll: Log creation of signalfd handles at noise levelKim Alvefur2024-03-011-0/+1
| | | | | | | | To aid in tracking down signalfd-related problems
* | util.bit53: Add bnot() methodMatthew Wild2024-03-012-0/+7
| |
* | util.signal: Fail signalfd() if unable to change signal maskKim Alvefur2024-02-281-1/+4
| | | | | | | | | | By aborting early, the failure should be brought to the attention somehow.
* | net.server_epoll: Log failure to hook signalsKim Alvefur2024-02-281-1/+6
| | | | | | | | To make any such failures noticeable
* | Merge 0.12->trunkKim Alvefur2024-02-271-1/+1
|\|
| * net.http.files: Validate argument to setup functionKim Alvefur2024-02-271-1/+1
| | | | | | | | Fixes error in #1765 by throwing an error earlier
* | mod_s2s: Comment on why we avoid hostnames in stanza bounce messagesKim Alvefur2024-02-241-0/+2
| |
* | mod_cron: Fix log format to account for float that was integer beforeKim Alvefur2024-02-242-2/+2
| |
* | mod_cron: Sync Teal source with 92301fa7a673Kim Alvefur2024-02-241-2/+10
| | | | | | | | | | Yeah, it's weird to have two versions. Needing more build dependencies is also something we want to avoid, so here we are.
* | util.signal: Wrap signalfd in an userdatum for gc handling etcKim Alvefur2024-02-242-9/+63
| |
* | net.server_epoll: Support hooking signals via signalfdKim Alvefur2024-02-241-0/+15
| | | | | | | | | | | | Handling signal events the same way as all other events makes sense and seems safer than the signal handling just jumping around in C and messing with Lua states.
* | util.signal: Add support for signalfd(2) on LinuxKim Alvefur2024-02-241-0/+34
| | | | | | | | | | | | | | | | | | signalfd allows handling signal events using the same method as sockets, via file descriptors. Thus all signal dispatch can go through the same main event loop as everything else, removing need for thread-scary signal handling where execution would just jump to the signal handler regardless of the state of Lua, and needing to keep track of Lua states/threads.
* | features: Add mod_server_infoMatthew Wild2024-02-231-0/+2
| |
* | mod_server_contact_info: Update to publish fields via new mod_server_infoMatthew Wild2024-02-231-12/+25
| |
* | mod_server_info: New module to manage the serverinfo disco extension formMatthew Wild2024-02-231-0/+55
| | | | | | | | | | | | | | | | This allows multiple modules to populate the form dynamically. Currently the form is "owned" by mod_server_contact_info, which prevents other modules from contributing to it. A further commit will port mod_server_contact_info to use this module.
* | util.strbitop: Add common_prefix_bits() to Teal interface descriptionKim Alvefur2024-02-231-0/+1
| |
* | util.hashes: Add missing entries to Teal interface descriptionKim Alvefur2024-02-231-2/+6
| | | | | | | | Also sorted to match C source
* | util.crypto: Update Teal interface description to match C sourcesKim Alvefur2024-02-231-12/+40
| | | | | | | | | | | | Was missing some entries. Rearranged to match order of entries in the C source Reg table.
* | tools/test_mutants.sh: Load loader helper when running bustedMatthew Wild2024-02-231-1/+1
| |