]> arthur.barton.de Git - ngircd-alex.git/commitdiff
New configuration option "NoZeroConf" to disable ZeroConf registration
authorAlexander Barton <alex@barton.de>
Mon, 11 Oct 2010 14:54:49 +0000 (16:54 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 11 Oct 2010 14:54:49 +0000 (16:54 +0200)
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.

ChangeLog
NEWS
doc/sample-ngircd.conf
man/ngircd.conf.5.tmpl
src/ngircd/conf.c
src/ngircd/conf.h
src/ngircd/rendezvous.c

index 4402f068572ea1de4453811cfacc5236203f9f6d..de87b29f0c1bcb6a7cbf9af52f198ec5698cd422 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
 
 ngIRCd Release 17
 
 
 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",
   - 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",
diff --git a/NEWS b/NEWS
index 61e8331e31bdc7d056288d9fc3735a2fbc089d1c..3ab5ae960ce1c2f3703779baee351774b1620dfd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@
 
 ngIRCd Release 17
 
 
 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",
   - 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",
index a2694f8d2aaa7abc6cdfc2b55dba940a14e66dcc..fe34dffae1afc58230ecd4335ac4ebbb9eca972e 100644 (file)
        # Don't use PAM, even if ngIRCd has been compiled with support for it.
        ;NoPAM = no
 
        # 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
        # try to connect to other irc servers using ipv4 and ipv6, if possible
        ;ConnectIPv6 = yes
        ;ConnectIPv4 = yes
index f4f7f6e67f4febbc188b2d7aae14403069ad9e86..26457291ef124843b567c5dbc29da06f11a85398 100644 (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
 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.
 \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.
index acb401032f4d2679d6075b49d4868bde3c04fcb2..f8b470fa13e8e349ff54a84461783ef8afd7b551 100644 (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("  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));
 
 #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_NoDNS = false;
        Conf_NoIdent = false;
        Conf_NoPAM = false;
+       Conf_NoZeroConf = false;
 
        Conf_Oper_Count = 0;
        Conf_Channel_Count = 0;
 
        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;
        }
                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 ) {
 #ifdef WANT_IPV6
        /* the default setting for all the WANT_IPV6 special options is 'true' */
        if( strcasecmp( Var, "ConnectIPv6" ) == 0 ) {
index ff67dc79349ac2bb31fc0f54d082904bcac99877..47a499ae8ac44758e6de6d50512e50cc9ab84e7e 100644 (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 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)
 /*
  * try to connect to remote systems using the ipv6 protocol,
  * if they have an ipv6 address? (default yes)
index 7c106292b068dfa5c68fd7dc2dd38f368446dbe0..2d9ae6993d08b1c5666a5fda10161016f111c57e 100644 (file)
@@ -144,12 +144,16 @@ GLOBAL void Rendezvous_Exit( void )
 } /* Rendezvous_Exit */
 
 
 } /* Rendezvous_Exit */
 
 
+/**
+ * Register ZeroConf service
+ */
 GLOBAL bool Rendezvous_Register( char *Name, char *Type, UINT16 Port )
 {
 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;
        if( i >= MAX_RENDEZVOUS )
        /* Search free port structure */
        for( i = 0; i < MAX_RENDEZVOUS; i++ ) if( ! My_Rendezvous[i].Desc[0] ) break;
        if( i >= MAX_RENDEZVOUS )