about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)Author
2010-10-11New configuration option "NoZeroConf" to disable ZeroConf registrationAlexander Barton
If ngIRCd is compiled to register its services using ZeroConf (e.g. using Howl, Avahi or on Mac OS X) this parameter can be used to disable service registration at runtime.
2010-10-05Make sure sighandlers.h is listed in noinst_HEADERSAlexander Barton
... because it must be included in the distribution archive :-)
2010-10-05const'ify ngt_SyslogFacilityName() functionAlexander Barton
This fixes the following gcc compiler warning: tool.c: In function 'ngt_SyslogFacilityName': tool.c:195: warning: return discards qualifiers from pointer target type
2010-09-24New configuration option "SyslogFacility"Alexander Barton
The new option "SyslogFacility" deines the syslog "facility" to which ngIRCd should send log messages. Possible values are system dependant, but most probably "auth", "daemon", "user" and "local1" through "local7" are possible values; see syslog(3). Default is "local5" for historical reasons.
2010-09-24New functions ngt_SyslogFacilityName() and ngt_SyslogFacilityID()Alexander Barton
These both functions translate syslog facility names to ID numbers and vice versa. On systems that don't define the facilitynames[] array in syslog.h, we try to build one ourself.
2010-09-22Explicitly cast return value of read(2) to "int"Alexander Barton
This fixes the following gcc warning, emitted by Xcode: src/ngircd/sighandlers.c: In function 'Signal_Callback': src/ngircd/sighandlers.c:239: warning: implicit conversion shortens 64-bit value into a 32-bit value
2010-09-22Don't call sigaction() if it is not available on the systemAlexander Barton
2010-09-14Fix signalpipe file descriptor leak on RESTARTFlorian Westphal
Signals_Init() must only be called once. This does not affect any ngircd release version. Earlier version of this patch moved the io and sighandler initialization before the while() loop, but as Alexander Barton noticed that broke all systems without builtin select support in io.c...
2010-09-14sighandlers.{c|h}: Code cleanupAlexander Barton
- declare signals_catch[] array not between the function implementations. - rename now local function NGIRCd_Rehash() to Rehash(). - remove empty and therefore not used "catch SIGHUP; break;".
2010-09-14Make sighandlers.{c|h} compatible with ansi2knrAlexander Barton
2010-09-14Output connection status when dumping the internal server stateAlexander Barton
2010-09-14Reformat "server state" debug messages a little bitAlexander Barton
2010-09-14Enable the daemon to dump its internal state in debug-mode.Alexander Barton
This patch allows ngIRCd to dump its internal state (connected clients, actual configuration) when compiled with --enable-debug. The daemon catches two more signals: - SIGUSR1: toggle debug mode (on/off), - SIGUSR2: dump internal state to console/syslog.
2010-09-11signalhandlers: add fallback to deprecated sysv APIFlorian Westphal
2010-09-11remove NGIRCd_SignalRehashFlorian Westphal
now that the main signal handling is done from the dispatcher loop we can call NGIRCD_Rehash() directly. the /REHASH handler can queue the Rehash() function for execution by sending a SIGHUP. It will be run when we return back to the dispatch loop.
2010-09-11Add new 'delayed' signal handlers.Florian Westphal
Allows to defer/queue signal processing for execution on the next event dispatch call, i.e. we can perform any signal action in normal, non-signal context. Example uses: - Reload everything on HUP without writing a global "SIGHUP_received" variable - Dump status of internal Lists on SIGUSR1, etc.
2010-09-11io: add io_cloexec to set close-on-exec flag.Florian Westphal
2010-09-11ng_ipaddr.h: include assert.hFlorian Westphal
We use assert() in this header, so we should include assert.h.
2010-09-08Conn_SyncServerStruct(): test all connections; and work case insensitiveAlexander Barton
Fix synchronization of established connections and configured server structures after a configuration update: - Not only test servers that already have a connection, but also check and update configured servers to which a new connection is beeing established (SERVER_WAIT state). - And do the server name comparision case-insensitive.
2010-09-08Check_Servers(): skip servers already beeing connectedAlexander Barton
Let CheckServers() not only skip servers that already have a connection, but also skip servers to which a new connection is already beeing established (SERVER_WAIT state).
2010-09-08Check_Servers(): Code cleanupAlexander Barton
2010-08-19Don't reset My_Connections[Idx].lastping when reading dataAlexander Barton
This fixes PING-PONG lag calculation (which resulted in "0" before). The "lastping" time is still reset it if a time shift backwards has been detected to prevent the daemon from miscalculating ping timeouts.
2010-08-18write_whoreply(): respect hostname cloakingAlexander Barton
2010-08-17IRC_USERHOST(): respect hostname cloakingAlexander Barton
2010-08-17IRC_USERHOST(): Code cleanup & some documentationAlexander Barton
2010-08-17Send_Message(): respect hostname cloakingAlexander Barton
2010-08-17IRC_WriteStrClientPrefix() / Get_Prefix(): respect hostname cloakingAlexander Barton
2010-08-17Refactor IRC_WriteStr{Channel|Related}Prefix(); support cloakingAlexander Barton
Move common code to new local function Send_Marked_Connections() and respect hostname cloaking.
2010-08-17Implement user mode "x": hostname cloaking (closes: #102)Alexander Barton
When a client has user mode "x" set, its real hostname is cloaked by substituting it with the server name (as configured in ngircd.conf). Restricted clients (user mode "r") aren't allowed to change mode "x". Please note that hostname cloaking is only in effect in server-client communication! The server still uses the real hostname for its own logging and for all server-server communication -- therefore all servers in the network must support user mode "x" to prevent older servers from leaking the real hostname of a cloaked client!
2010-08-17WHOWAS: respect hostname cloakingAlexander Barton
Store cloaked hostname if user mode "x" is set when the client disconnects from the server.
2010-08-17WHOIS: respect hostname cloakingAlexander Barton
2010-08-17Implement Client_HostnameCloaked() and Client_MaskCloaked()Alexander Barton
These two functions return the cloaked hostname, if the client has enabled hostname cloaking indicated by the -- still to implement -- user mode "x". See furter patches :-)
2010-08-17Clean up an document Client_Hostname() and Client_Mask()Alexander Barton
2010-08-12ngircd: change MOTD file handlingFlorian Westphal
previously, the given MotdFile file was read whenever a client requested it. Change handling to read the MotdFile contents into memory once during config file parsing. Two side effects: - changes to the MOTD file do not have any effect until ngircds configuration is reloaded - MOTD file does no longer have to reside in the chroot directory (the MOTD contents will then not be re-read on reload in that case)
2010-08-01startup: open /dev/null before chrootFlorian Westphal
before people had to create a /dev/null inside the chroot to make redirection work.
2010-07-25Allow IRC ops to change channel modes even without OperServerMode setAlexander Barton
2010-07-25Allow IRC operators to use MODE command on any channel (closes: #100)Florian Westphal
This allows IRC operators to change channel modes of ANY channel, even without joining these channels first.
2010-07-14Remove Proc_Kill(), use timeout to kill child processesAlexander Barton
This avoids a race and potentionally killing the wrong process on systems that use randomized process IDs; now the child itself is responsible to exit in a timely manner using SIGALRM.
2010-07-14New function Conn_CloseAllSockets() to close all open socketsAlexander Barton
This is useful in forked child processes, for example, to make sure that they don't hold connections open that the main process wants to close.
2010-07-13Authenticated users should be registered without the "~" markAlexander Barton
2010-07-13Don't Proc_Kill() childs after Proc_Read(): done there already.Alexander Barton
2010-07-13Don't even fork a PAM-subprocess if "NoPAM" option is setAlexander Barton
2010-07-13Use Proc_GenericSignalHandler() as handler for SIGTERM by defaultAlexander Barton
2010-07-13Mark some variables as "unused" to prevent compiler warningsAlexander Barton
Some variables are only used when compiling with IDENT or PAM support or when the debug code is enabled. Mark them as "unused" so that gcc doesn't generate warnings when neither of these options is enabled.
2010-07-13Set NoPAM=yes in configuration files used for the testsuiteAlexander Barton
2010-07-13New configuration option "NoPAM" to disable PAMAlexander Barton
When the "NoPAM" configuration option is set and ngIRCd is compiled with support for PAM, ngIRCd will not call any PAM functions: all connection attemps without password will succeed instead and all connection attemps with password will fail. If ngIRCd is compiled without PAM support, this option is a dummy option and nothing changes: the global server password will still be in effect.
2010-07-12io.c: Include conn.h when using the select() APIAlexander Barton
2010-07-12Use correct preprocessor syntax when testing for PAM and IDENTAUTHAlexander Barton
2010-07-12Make sure signal.h is #include'd when neededAlexander Barton
2010-07-12Implement asynchronous user authentication using PAMAlexander Barton
For each client connection a child process is forked which handles the actual PAM authentication and reports the result back to the master process using a pipe for communication. While the PAM authentication is in process the daemon does not block.