New configuration option "NoZeroConf" to disable ZeroConf registration

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.
This commit is contained in:
Alexander Barton 2010-10-11 16:54:49 +02:00
parent 4226db873f
commit a988bbc86a
7 changed files with 32 additions and 2 deletions

View File

@ -12,6 +12,9 @@
ngIRCd Release 17
- New configuration option "NoZeroConf" to disable service registration at
runtime even if ngIRCd is compiled with support for ZeroConf (e.g. using
Howl, Avahi or on Mac OS X).
- New configuration option "SyslogFacility" to define the syslog "facility"
(the "target"), to which ngIRCd should send its log messages.
Possible values are system dependant, but most probably "auth", "daemon",

3
NEWS
View File

@ -12,6 +12,9 @@
ngIRCd Release 17
- New configuration option "NoZeroConf" to disable service registration at
runtime even if ngIRCd is compiled with support for ZeroConf (e.g. using
Howl, Avahi or on Mac OS X).
- New configuration option "SyslogFacility" to define the syslog "facility"
(the "target"), to which ngIRCd should send its log messages.
Possible values are system dependant, but most probably "auth", "daemon",

View File

@ -144,6 +144,10 @@
# Don't use PAM, even if ngIRCd has been compiled with support for it.
;NoPAM = no
# Don't use ZeroConf service registration, even if ngIRCd has been
# compiled with support for it (e.g. Howl, Avahi, Mac OS X).
;NoZeroConf = no
# try to connect to other irc servers using ipv4 and ipv6, if possible
;ConnectIPv6 = yes
;ConnectIPv4 = yes

View File

@ -222,6 +222,12 @@ to the PAM library at runtime; all users connecting without password are
allowed to connect, all passwords given will fail.
Default: no.
.TP
\fBNoZeroConf\fR
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.
Default: no.
.TP
\fBConnectIPv4\fR
Set this to no if you do not want ngIRCd to connect to other IRC servers using
IPv4. This allows usage of ngIRCd in IPv6-only setups.

View File

@ -338,6 +338,7 @@ Conf_Test( void )
printf(" NoDNS = %s\n", yesno_to_str(Conf_NoDNS));
printf(" NoIdent = %s\n", yesno_to_str(Conf_NoIdent));
printf(" NoPAM = %s\n", yesno_to_str(Conf_NoPAM));
printf(" NoZeroConf = %s\n", yesno_to_str(Conf_NoZeroConf));
#ifdef WANT_IPV6
printf(" ConnectIPv4 = %s\n", yesno_to_str(Conf_ConnectIPv6));
@ -587,6 +588,7 @@ Set_Defaults(bool InitServers)
Conf_NoDNS = false;
Conf_NoIdent = false;
Conf_NoPAM = false;
Conf_NoZeroConf = false;
Conf_Oper_Count = 0;
Conf_Channel_Count = 0;
@ -1048,6 +1050,11 @@ Handle_GLOBAL( int Line, char *Var, char *Arg )
Conf_NoPAM = Check_ArgIsTrue(Arg);
return;
}
if(strcasecmp(Var, "NoZeroConf") == 0) {
/* don't register services using ZeroConf */
Conf_NoZeroConf = Check_ArgIsTrue(Arg);
return;
}
#ifdef WANT_IPV6
/* the default setting for all the WANT_IPV6 special options is 'true' */
if( strcasecmp( Var, "ConnectIPv6" ) == 0 ) {

View File

@ -152,6 +152,9 @@ GLOBAL bool Conf_NoIdent;
/* Disable all usage of PAM, even when compiled with support for it */
GLOBAL bool Conf_NoPAM;
/* Disable service registration using "ZeroConf" */
GLOBAL bool Conf_NoZeroConf;
/*
* try to connect to remote systems using the ipv6 protocol,
* if they have an ipv6 address? (default yes)

View File

@ -144,12 +144,16 @@ GLOBAL void Rendezvous_Exit( void )
} /* Rendezvous_Exit */
/**
* Register ZeroConf service
*/
GLOBAL bool Rendezvous_Register( char *Name, char *Type, UINT16 Port )
{
/* Register new service */
int i;
if (Conf_NoZeroConf)
return;
/* Search free port structure */
for( i = 0; i < MAX_RENDEZVOUS; i++ ) if( ! My_Rendezvous[i].Desc[0] ) break;
if( i >= MAX_RENDEZVOUS )