Commit Diff


commit - 4226db873fa01e0c50a48fc8c96605e5420f5732
commit + a988bbc86aed404b7bcfdbceafc030ea4bc5ecab
blob - 4402f068572ea1de4453811cfacc5236203f9f6d
blob + de87b29f0c1bcb6a7cbf9af52f198ec5698cd422
--- ChangeLog
+++ ChangeLog
@@ -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",
blob - 61e8331e31bdc7d056288d9fc3735a2fbc089d1c
blob + 3ab5ae960ce1c2f3703779baee351774b1620dfd
--- NEWS
+++ NEWS
@@ -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",
blob - a2694f8d2aaa7abc6cdfc2b55dba940a14e66dcc
blob + fe34dffae1afc58230ecd4335ac4ebbb9eca972e
--- doc/sample-ngircd.conf
+++ doc/sample-ngircd.conf
@@ -143,6 +143,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
blob - f4f7f6e67f4febbc188b2d7aae14403069ad9e86
blob + 26457291ef124843b567c5dbc29da06f11a85398
--- man/ngircd.conf.5.tmpl
+++ man/ngircd.conf.5.tmpl
@@ -220,6 +220,12 @@ Default: no.
 If ngIRCd is compiled with PAM support this can be used to disable all calls
 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
blob - acb401032f4d2679d6075b49d4868bde3c04fcb2
blob + f8b470fa13e8e349ff54a84461783ef8afd7b551
--- src/ngircd/conf.c
+++ src/ngircd/conf.c
@@ -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 ) {
blob - ff67dc79349ac2bb31fc0f54d082904bcac99877
blob + 47a499ae8ac44758e6de6d50512e50cc9ab84e7e
--- src/ngircd/conf.h
+++ src/ngircd/conf.h
@@ -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)
blob - 7c106292b068dfa5c68fd7dc2dd38f368446dbe0
blob + 2d9ae6993d08b1c5666a5fda10161016f111c57e
--- src/ngircd/rendezvous.c
+++ src/ngircd/rendezvous.c
@@ -144,11 +144,15 @@ 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;
 
-	int i;
+	if (Conf_NoZeroConf)
+		return;
 
 	/* Search free port structure */
 	for( i = 0; i < MAX_RENDEZVOUS; i++ ) if( ! My_Rendezvous[i].Desc[0] ) break;