1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-10-12 21:27:42 +00:00

Compare commits

...

16 Commits

Author SHA1 Message Date
Alexander Barton
defd7e09af ngIRCd release 16 2010-05-02 15:25:35 +02:00
Florian Westphal
29d448ed63 doc/SSL: remove line continuation marker
some people got confused by the '\' line continuation marker,
thus put everything in a single line, even if the line gets overly long.
2010-05-01 20:29:18 +02:00
Alexander Barton
bdec5ac1f3 ngIRCd release 16~rc2 2010-04-25 13:13:11 +02:00
Alexander Barton
73fd26e9fa Don't reset counters on RESTART
When ngIRCd restarts, all the connection counters are preserved now,
as well as the command counters for example.

It's unclear if resetting or not resetting is the "correct" behaviour,
but it's quite clear that the behaviour should be consistent for all the
counters ngIRCd uses ...

And initializing "WCounter", the global but temporary write counter,
is not necessarry at all: it is initialized (reset) before its use in
the command parser (see parse.c).
2010-04-25 12:54:13 +02:00
Alexander Barton
79e1ec2b1e New numeric RPL_STATSCONN (250): display connection statistics
The RPL_STATSCONN numeric (250) displays information about the
highest simoultaneous connection count and the number of all
accepted connections since the daemon started up.

Used by ircd-Hybrid, Bahamut, and Unreal for example.
2010-04-23 23:30:14 +02:00
Alexander Barton
615d09459e Display total number of served connections on daemon shutdown 2010-04-23 23:29:22 +02:00
Alexander Barton
1338ade650 Enhace connection statistics counters
This patch enables ngIRCd to count the highest maximum simultaneous
connections and all the connections accepted since startup.

New functions:
- Conn_Count(): get current connections
- Conn_CountMax(): maximum simultaneous connections
- Conn_CountAccepted(): number of connections accepted
2010-04-23 23:25:34 +02:00
Alexander Barton
21140500f1 Conn_Init: code cleanup 2010-04-23 22:23:51 +02:00
Alexander Barton
77ceb9f8ab Updated doc/Platforms.txt 2010-04-23 11:04:39 +02:00
Alexander Barton
b042363e88 Only include <netinet/in_systm.h> if it exists 2010-04-23 11:04:15 +02:00
Alexander Barton
6b0bb665c3 Include netinet/{in.h, in_systm.h} when checking for netinet/ip.h
This solves warning messages of autoconf on e.g. FreeBSD 8:

configure: WARNING: netinet/ip.h: present but cannot be compiled
configure: WARNING: netinet/ip.h:   check for missing prerequisite headers?
2010-04-23 10:55:50 +02:00
Alexander Barton
1caa3fb94b Include netinet/in_systm.h alongside netinet/ip.h
This fixes the following error when compiling on e.g. FreeBSD 6.x:

In file included from conn.c:40:
/usr/include/netinet/ip.h:160: error: syntax error before "n_long"
/usr/include/netinet/ip.h:163: error: syntax error before "n_long"
2010-04-11 16:58:29 +00:00
Alexander Barton
025342fe46 Fix gcc warning "ignoring return value of ..."
This patch fixes two warnings of gcc 4.4.3 when used with eglibc 2.11.1:

ngircd.c: In function ‘NGIRCd_Init’:
ngircd.c:801: warning: ignoring return value of ‘chdir’, declared with
 attribute warn_unused_result
conn.c: In function ‘Simple_Message’:
conn.c:2041: warning: ignoring return value of ‘write’, declared with
 attribute warn_unused_result

The first by checking the return code and an appropriate error message,
the second by "better" ignoring it (which is correct there!) ...
2010-04-09 20:14:11 +02:00
Alexander Barton
628c6c962b Only compile in Get_Error() if really needed
This fixes "resolve.c:150: warning: ‘Get_Error’ defined but not used".
2010-04-09 20:06:44 +02:00
Alexander Barton
1ed49de83a Updated some more copyright notices, it's 2010 already (part 2)
Silly me forgot the most important place, the program output itself ...
2010-04-02 14:22:07 +02:00
Alexander Barton
bb914b93e9 Updated some more copyright notices, it's 2010 already :-) 2010-04-02 14:19:36 +02:00
15 changed files with 151 additions and 55 deletions

View File

@@ -1,7 +1,7 @@
ngIRCd - Next Generation IRC Server
(c)2001-2009 Alexander Barton,
(c)2001-2010 Alexander Barton,
alex@barton.de, http://www.barton.de/
ngIRCd is free software and published under the
@@ -10,7 +10,21 @@
-- ChangeLog --
ngIRCd Release 16
ngIRCd Release 16 (2010-05-02)
- doc/SSL: remove line continuation marker
ngIRCd 16~rc2 (2010-04-25)
- Updated some more copyright notices, it's 2010 already :-)
- Only compile in Get_Error() if really needed
- Fix gcc warning "ignoring return value of ..."
- Include netinet/in_systm.h alongside netinet/ip.h
- Include netinet/{in.h, in_systm.h} when checking for netinet/ip.h
- Only include <netinet/in_systm.h> if it exists
- Updated doc/Platforms.txt
- Enhace connection statistics counters: display total number of served
connections on daemon shutdown and when a new client connects using
the new numeric RPL_STATSCONN (250).
ngIRCd 16~rc1 (2010-03-25)
- Various fixes to the build system and code cleanups.

7
NEWS
View File

@@ -10,7 +10,12 @@
-- NEWS --
ngIRCd Release 16
ngIRCd Release 16 (2010-05-02)
ngIRCd 16~rc2 (2010-04-25)
- Enhace connection statistics counters: display total number of served
connections on daemon shutdown and when a new client connects using
the new numeric RPL_STATSCONN (250).
ngIRCd 16~rc1 (2010-03-25)
- Implement WEBIRC command used by some Web-IRC frontends. The password

View File

@@ -12,7 +12,7 @@
# -- Initialisation --
AC_PREREQ(2.50)
AC_INIT(ngircd, 16~rc1)
AC_INIT(ngircd, 16)
AC_CONFIG_SRCDIR(src/ngircd/ngircd.c)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.6)
@@ -101,12 +101,19 @@ AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([ \
ctype.h errno.h fcntl.h netdb.h netinet/in.h stdlib.h string.h \
strings.h sys/socket.h sys/time.h unistd.h \
ctype.h errno.h fcntl.h netdb.h netinet/in.h netinet/in_systm.h \
stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h \
],,AC_MSG_ERROR([required C header missing!]))
AC_CHECK_HEADERS([ \
arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h])
arpa/inet.h ctype.h malloc.h netinet/ip.h stdbool.h stddef.h varargs.h \
],[],[],[[
#include <netinet/in.h>
#ifdef HAVE_NETINET_IN_SYSTM_H
#include <netinet/in_systm.h>
#endif
]]
)
# -- Datatypes --

View File

@@ -1,8 +1,20 @@
ngircd (16-0ab1) unstable; urgency=low
* New "upstream" release: ngIRCd 16.
-- Alexander Barton <alex@barton.de> Sun, 02 May 2010 13:32:41 +0200
ngircd (16~rc2-0ab1) unstable; urgency=low
* New "upstream" release candidate 2 for ngIRCd Release 16.
-- Alexander Barton <alex@barton.de> Sun, 25 Apr 2010 13:12:42 +0200
ngircd (16~rc1-0ab1) unstable; urgency=low
* New "upstream" release candidate 1 for ngIRCd Release 16.
-- Alexander Barton <alex@barton.de> Thu, 25 Mar 2010 15:56:03 +0100
-- Alexander Barton <alex@barton.de> Thu, 25 Mar 2010 15:56:03 +0200
ngircd (15-0ab1) unstable; urgency=low

View File

@@ -4,7 +4,7 @@
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural
\f0\i\fs24 \cf0 ngIRCd -- The Next Generation IRC Daemon\
Copyright (c)2001-2009 Alexander Barton and Contributors.\
Copyright (c)2001-2010 Alexander Barton and Contributors.\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
\i0 \cf0 \
@@ -187,4 +187,4 @@ To disable automatic starting of ngIRCd, use this command:\
\ls2\ilvl0
\f1\fs24 \cf0 sudo launchctl unload -w \\\
/Library/LaunchDaemons/de.barton.ngircd.plist\
}]]></resource></locale></resources><flags/><item type="file">01ngircd.xml</item><item type="file">02de.xml</item><mod>properties.customizeOption</mod><mod>properties.title</mod><mod>description</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>
}]]></resource></locale></resources><flags/><item type="file">01ngircd.xml</item><item type="file">02de.xml</item><mod>properties.customizeOption</mod><mod>properties.title</mod><mod>description</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>

View File

@@ -1,5 +1,5 @@
%define name ngircd
%define version 16~rc1
%define version 16
%define release 1
%define prefix %{_prefix}

View File

@@ -1,7 +1,7 @@
ngIRCd - Next Generation IRC Server
(c)2001-2009 Alexander Barton
(c)2001-2010 Alexander Barton
alex@barton.de, http://www.barton.de/
ngIRCd is free software and published under the
@@ -32,23 +32,24 @@ hppa1.1/unknown/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y
hppa2.0/unknown/linux-gnu gcc 3.3.5 13~rc1 08-12-02 alex Y Y Y Y
hppa2.0w-hp-hpux11.11 gcc 4.2.3 14.1 09-07-22 goetz Y Y Y Y
i386/apple/darwin9.7.0 gcc 4.0.1 14.1 09-08-04 alex Y Y Y Y (3)
i386/apple/darwin10.0.0b2 gcc 4.2.1 14.1 09-07-27 alex Y Y Y Y (3)
i386/apple/darwin10.3.0 gcc 4.2.1 16 10-04-23 alex Y Y Y Y (3)
i386/pc/solaris2.9 gcc 3.2.2 CVSHEAD 04-02-24 alex Y Y Y Y
i386/pc/solaris2.11 gcc 3.4.3 14.1 09-08-03 alex Y Y Y Y (4)
i386/unknown/freebsd5.2.1 gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y
i386/unknown/freebsd6.0 gcc 3.4.4 0.10.0-p1 06-08-04 alex Y Y Y Y (3)
i386/unknown/freebsd6.1 gcc 3.4.4 CVSHEAD 06-05-07 fw Y Y Y Y (3)
i386/unknown/freebsd6.2 gcc 3.4.6 14.1 09-07-27 alex Y Y Y Y (3)
i386/unknown/freebsd6.2 gcc 3.4.6 16 10-04-11 alex Y Y Y Y (3)
i386/unknown/freebsd7.0 gcc 4.2.1 14.1 09-07-28 alex Y Y Y Y (3)
i386/unknown/freebsd7.2 gcc 4.2.1 14.1 09-08-03 alex Y Y Y Y (3)
i386/unknown/freebsd7.3 gcc 4.2.1 16 10-04-11 alex Y Y Y Y (3)
i386/unknown/gnu0.3 gcc 3.3.3 0.8.0 04-05-30 alex Y Y n Y
i686/unknown/gnu0.3 gcc 4.3.1 14.1 09-07-28 alex Y Y Y Y
i686/unkn./kfreebsd7.2-gnu gcc 4.3.4 15 09-12-02 alex Y Y Y Y (3)
i386/unknown/netbsdelf1.6.1 gcc 2.95.3 CVSHEAD 04-02-24 alex Y Y Y Y
i386/unknown/netbsdelf3.0.1 gcc 3.3.3 0.10.0-p1 06-08-30 alex Y Y Y Y (3)
i386/unknown/netbsdelf4.0 gcc 4.1.2 14.1 09-07-28 alex Y Y Y Y (3)
i386/unknown/netbsdelf4.0 gcc 4.1.2 16 10-04-11 alex Y Y Y Y (3)
i386/unknown/openbsd3.9 gcc 3.3.5 0.10.0-p1 06-08-30 alex Y Y Y Y (3)
i386/unknown/openbsd4.1 gcc 3.3.5 14.1 09-07-28 alex Y Y Y Y (3)
i386/unknown/openbsd4.1 gcc 3.3.5 16 10-04-11 alex Y Y Y Y (3)
i586/pc/interix3.5 gcc 3.3 15 10-01-22 alex Y Y N Y
i686/pc/cygwin gcc 3.3.1 0.8.0 04-05-30 alex Y Y n Y
i686/pc/linux-gnu gcc 2.95.4 0.8.0 04-05-30 alex Y Y Y Y (1)
@@ -67,7 +68,8 @@ powerpc/unknown/openbsd3.6 gcc 2.95.3 0.10.0 06-10-08 alex Y Y n Y
sparc/sun/solaris2.6 gcc 2.95.3 0.7.x-CVS 03-04-22 alex Y Y Y Y
sparc/sun/solaris2.7 gcc 3.3 0.8.0 04-05-30 alex Y Y Y Y
sparc/unkn./netbsdelf1.6.1 gcc 2.95.3 0.8.0 04-05-30 alex Y Y Y Y
x86_64/unknown/linux-gnu gcc 4.3.2 14.1 09-08-04 alex Y Y Y Y (1)
x86_64/unknown/freebsd8.0 gcc 4.2.1 16 10-04-23 alex Y Y Y Y (3)
x86_64/unknown/linux-gnu gcc 4.3.2 16 10-04-23 alex Y Y Y Y (1)
Notes

View File

@@ -49,8 +49,7 @@ Creating a self-signed certificate
OpenSSL:
Creating a self-signed certificate and key:
$ openssl req -newkey rsa:2048 -x509 -keyout server-key.pem \
-out server-cert.pem -days 1461
$ openssl req -newkey rsa:2048 -x509 -keyout server-key.pem -out server-cert.pem -days 1461
Create DH parameters (optional):
$ openssl dhparam -2 -out dhparams.pem 2048
@@ -58,8 +57,7 @@ GnuTLS:
Creating a self-signed certificate and key:
$ certtool --generate-privkey --bits 2048 --outfile server-key.pem
$ certtool --generate-self-signed --load-privkey server-key.pem \
--outfile server-cert.pem
$ certtool --generate-self-signed --load-privkey server-key.pem --outfile server-cert.pem
Create DH parameters (optional):
$ certtool --generate-dh-params --bits 2048 --outfile dhparams.pem

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
* Copyright (c)2001-2010 Alexander Barton <alex@barton.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -37,6 +37,9 @@
#include <netinet/in.h>
#ifdef HAVE_NETINET_IP_H
# ifdef HAVE_NETINET_IN_SYSTM_H
# include <netinet/in_systm.h>
# endif
# include <netinet/ip.h>
#endif
@@ -92,10 +95,12 @@ static bool Init_Socket PARAMS(( int Sock ));
static void New_Server PARAMS(( int Server, ng_ipaddr_t *dest ));
static void Simple_Message PARAMS(( int Sock, const char *Msg ));
static int NewListener PARAMS(( const char *listen_addr, UINT16 Port ));
static void Account_Connection PARAMS((void));
static array My_Listeners;
static array My_ConnArray;
static size_t NumConnections;
static size_t NumConnections, NumConnectionsMax, NumConnectionsAccepted;
#ifdef TCPWRAP
int allow_severity = LOG_INFO;
@@ -366,8 +371,8 @@ Conn_Init( void )
Pool_Size = Conf_MaxConnections;
if (!array_alloc(&My_ConnArray, sizeof(CONNECTION), (size_t)Pool_Size)) {
Log( LOG_EMERG, "Can't allocate memory! [Conn_Init]" );
exit( 1 );
Log(LOG_EMERG, "Can't allocate memory! [Conn_Init]");
exit(1);
}
/* FIXME: My_Connetions/Pool_Size is needed by other parts of the
@@ -375,17 +380,15 @@ Conn_Init( void )
My_Connections = (CONNECTION*) array_start(&My_ConnArray);
LogDebug("Allocated connection pool for %d items (%ld bytes).",
array_length(&My_ConnArray, sizeof( CONNECTION )), array_bytes(&My_ConnArray));
array_length(&My_ConnArray, sizeof(CONNECTION)),
array_bytes(&My_ConnArray));
assert( array_length(&My_ConnArray, sizeof( CONNECTION )) >= (size_t) Pool_Size);
assert(array_length(&My_ConnArray, sizeof(CONNECTION)) >= (size_t)Pool_Size);
array_free( &My_Listeners );
/* Connection-Struktur initialisieren */
for( i = 0; i < Pool_Size; i++ ) Init_Conn_Struct( i );
/* Global write counter */
WCounter = 0;
for (i = 0; i < Pool_Size; i++)
Init_Conn_Struct(i);
} /* Conn_Init */
@@ -1098,6 +1101,27 @@ Conn_Close( CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClie
} /* Conn_Close */
GLOBAL long
Conn_Count(void)
{
return NumConnections;
} /* Conn_Count */
GLOBAL long
Conn_CountMax(void)
{
return NumConnectionsMax;
} /* Conn_CountMax */
GLOBAL long
Conn_CountAccepted(void)
{
return NumConnectionsAccepted;
} /* Conn_CountAccepted */
GLOBAL void
Conn_SyncServerStruct( void )
{
@@ -1238,6 +1262,7 @@ New_Connection(int Sock)
Log(LOG_CRIT, "Can't accept connection: %s!", strerror(errno));
return -1;
}
NumConnectionsAccepted++;
if (!ng_ipaddr_tostr_r(&new_addr, ip_str)) {
Log(LOG_CRIT, "fd %d: Can't convert IP address!", new_sock);
@@ -1357,12 +1382,22 @@ New_Connection(int Sock)
* If there are results earlier, the delay is aborted. */
Conn_SetPenalty(new_sock, 4);
NumConnections++;
LogDebug("Total number of connections now %ld.", NumConnections);
Account_Connection();
return new_sock;
} /* New_Connection */
static void
Account_Connection(void)
{
NumConnections++;
if (NumConnections > NumConnectionsMax)
NumConnectionsMax = NumConnections;
LogDebug("Total number of connections now %lu (max %lu).",
NumConnections, NumConnectionsMax);
} /* Account_Connection */
static CONN_ID
Socket2Index( int Sock )
{
@@ -1802,7 +1837,7 @@ New_Server( int Server , ng_ipaddr_t *dest)
}
/* Conn_Close() decrements this counter again */
NumConnections++;
Account_Connection();
Client_SetIntroducer( c, c );
Client_SetToken( c, TOKEN_OUTBOUND );
@@ -2025,20 +2060,32 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
} /* cb_Read_Resolver_Result */
/**
* Write a "simple" (error) message to a socket.
* The message is sent without using the connection write buffers, without
* compression/encryption, and even without any error reporting. It is
* designed for error messages of e.g. New_Connection(). */
static void
Simple_Message( int Sock, const char *Msg )
Simple_Message(int Sock, const char *Msg)
{
char buf[COMMAND_LEN];
size_t len;
/* Write "simple" message to socket, without using compression
* or even the connection write buffers. Used e.g. for error
* messages by New_Connection(). */
assert( Sock > NONE );
assert( Msg != NULL );
strlcpy( buf, Msg, sizeof buf - 2);
len = strlcat( buf, "\r\n", sizeof buf);
(void)write(Sock, buf, len);
assert(Sock > NONE);
assert(Msg != NULL);
strlcpy(buf, Msg, sizeof buf - 2);
len = strlcat(buf, "\r\n", sizeof buf);
if (write(Sock, buf, len) < 0) {
/* Because this function most probably got called to log
* an error message, any write error is ignored here to
* avoid an endless loop. But casting the result of write()
* to "void" doesn't satisfy the GNU C code attribute
* "warn_unused_result" which is used by some versions of
* glibc (e.g. 2.11.1), therefore this silly error
* "handling" code here :-( */
return;
}
} /* Simple_Error */

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2009 by Alexander Barton (alex@barton.de)
* Copyright (c)2001-2010 Alexander Barton <alex@barton.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -122,5 +122,9 @@ static inline bool Conn_UsesSSL(UNUSED CONN_ID Idx) { return false; }
#endif
#endif
GLOBAL long Conn_Count PARAMS((void));
GLOBAL long Conn_CountMax PARAMS((void));
GLOBAL long Conn_CountAccepted PARAMS((void));
/* -eof- */

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
* Copyright (c)2001-2010 Alexander Barton <alex@barton.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1176,6 +1176,10 @@ IRC_Send_LUSERS( CLIENT *Client )
if(! IRC_WriteStrClient(Client, RPL_NETUSERS_MSG, Client_ID(Client),
cnt, max, cnt, max))
return DISCONNECTED;
/* Connection counters */
if (! IRC_WriteStrClient(Client, RPL_STATSCONN_MSG, Client_ID(Client),
Conn_CountMax(), Conn_CountAccepted()))
return DISCONNECTED;
#endif
return CONNECTED;

View File

@@ -146,8 +146,8 @@ GLOBAL void
Log_Exit( void )
{
/* Good Bye! */
if( NGIRCd_SignalRestart ) Log( LOG_NOTICE, "%s done (restarting).", PACKAGE_NAME );
else Log( LOG_NOTICE, "%s done.", PACKAGE_NAME );
Log(LOG_NOTICE, "%s done%s, served %lu connections.", PACKAGE_NAME,
NGIRCd_SignalRestart ? " (restarting)" : "", Conn_CountAccepted());
#ifdef DEBUG
if( Error_File[0] )

View File

@@ -46,6 +46,7 @@
#define RPL_TRACEEND_MSG "262 %s %s %s-%s.%s :End of TRACE"
#define RPL_LOCALUSERS_MSG "265 %s %lu %lu :Current local users: %lu, Max: %lu"
#define RPL_NETUSERS_MSG "266 %s %lu %lu :Current global users: %lu, Max: %lu"
#define RPL_STATSCONN_MSG "250 %s :Highest connection count: %lu (%lu connections received)"
#define RPL_AWAY_MSG "301 %s %s :%s"
#define RPL_USERHOST_MSG "302 %s :"

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2009 Alexander Barton (alex@barton.de).
* Copyright (c)2001-2010 Alexander Barton (alex@barton.de).
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -562,7 +562,7 @@ static void
Show_Version( void )
{
puts( NGIRCd_Version );
puts( "Copyright (c)2001-2009 Alexander Barton (<alex@barton.de>) and Contributors." );
puts( "Copyright (c)2001-2010 Alexander Barton (<alex@barton.de>) and Contributors." );
puts( "Homepage: <http://ngircd.barton.de/>\n" );
puts( "This is free software; see the source for copying conditions. There is NO" );
puts( "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." );
@@ -798,7 +798,9 @@ NGIRCd_Init( bool NGIRCd_NoDaemon )
#else
setpgrp(0, getpid());
#endif
chdir( "/" );
if (chdir( "/" ) != 0)
Log(LOG_ERR, "Can't change directory to '/': %s",
strerror(errno));
/* Detach stdin, stdout and stderr */
Setup_FDStreams( );

View File

@@ -144,8 +144,8 @@ Resolve_Init(RES_STAT *s)
}
#ifndef WANT_IPV6
#ifdef h_errno
#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
#if !defined(WANT_IPV6) && defined(h_errno)
static char *
Get_Error( int H_Error )
{
@@ -162,8 +162,8 @@ Get_Error( int H_Error )
}
return "unknown error";
}
#endif /* h_errno */
#endif /* WANT_IPV6 */
#endif
#endif
/* Do "IDENT" (aka "AUTH") lookup and append result to resolved_addr array */