diff --git a/ChangeLog b/ChangeLog index 07e77a9..6cd1e96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,16 @@ ngIRCd Release 17 + ngIRCd 17~rc3 (2010-10-27) + - Xcode builds: detect version number correctly, updateed project file + to use the Mac OS X 10.5.x SDK, disable pam_fail_delay() because it + is only available starting with Mac OS X 10.6, and generate a default + PAM configuration for the Mac OS X Installer.app package of ngIRCd. + - Debian: updated standards version to 3.9.1, added libpam0g-dev to the + dependencies, and install a default /etc/pam.d/ngircd allowing all logins. + - Make contrib/platformtest.sh more portable. + - Fix connect attempts to further IP addresses of outgoing server links. + ngIRCd 17~rc2 (2010-10-25) - ZeroConf: include header files missing since commit a988bbc86a. - Generate ngIRCd version number from GIT tag. diff --git a/Makefile.am b/Makefile.am index bea1cfc..e1d8d60 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ # # ngIRCd -- The Next Generation IRC Daemon -# Copyright (c)2001-2008 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 @@ -38,7 +38,7 @@ have-xcodebuild: || ( echo; echo "Error: \"xcodebuild\" not found!"; echo; exit 1 ) xcode: have-xcodebuild - rel=`grep AC_INIT configure.in | cut -d' ' -f2 | cut -d')' -f1`; \ + rel=`git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'`; \ def="GCC_PREPROCESSOR_DEFINITIONS=\"VERSION=\\\"$$rel\\\"\""; \ xcodebuild -project contrib/MacOSX/ngIRCd.xcodeproj -alltargets \ -configuration Default $$def build diff --git a/contrib/Debian/Makefile.am b/contrib/Debian/Makefile.am index b20da99..dd7c753 100644 --- a/contrib/Debian/Makefile.am +++ b/contrib/Debian/Makefile.am @@ -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 @@ -10,7 +10,7 @@ # EXTRA_DIST = rules changelog compat control copyright \ - ngircd.init ngircd.default ngircd.postinst + ngircd.init ngircd.default ngircd.pam ngircd.postinst maintainer-clean-local: rm -f Makefile Makefile.in diff --git a/contrib/Debian/changelog b/contrib/Debian/changelog index f81854c..000392b 100644 --- a/contrib/Debian/changelog +++ b/contrib/Debian/changelog @@ -1,3 +1,16 @@ +ngircd (17~rc3-0ab1) unstable; urgency=low + + * New "upstream" release candidate 3 for ngIRCd Release 17. + + -- Alexander Barton Wed, 27 Oct 2010 22:30:08 +0200 + +ngircd (17~rc2-0ab2) unstable; urgency=low + + * Install /etc/pam.d/ngircd including "auth required pam_permit.so" when + installing -full or -full-dbg variant to keep backwards compatibility. + + -- Alexander Barton Tue, 26 Oct 2010 23:34:56 +0200 + ngircd (17~rc2-0ab1) unstable; urgency=low * New "upstream" release candidate 2 for ngIRCd Release 17. diff --git a/contrib/Debian/control b/contrib/Debian/control index 13163ce..bccbcb9 100644 --- a/contrib/Debian/control +++ b/contrib/Debian/control @@ -2,8 +2,8 @@ Source: ngircd Section: net Priority: optional Maintainer: Alexander Barton -Build-Depends: debhelper (>> 4.0.0), libz-dev, libwrap0-dev, libident-dev, libgnutls-dev -Standards-Version: 3.8.0 +Build-Depends: debhelper (>> 4.0.0), libz-dev, libwrap0-dev, libident-dev, libgnutls-dev, libpam0g-dev +Standards-Version: 3.9.1 Package: ngircd Architecture: any diff --git a/contrib/Debian/ngircd.pam b/contrib/Debian/ngircd.pam new file mode 100644 index 0000000..4468e56 --- /dev/null +++ b/contrib/Debian/ngircd.pam @@ -0,0 +1,4 @@ +# /etc/pam.d/ngircd + +# allow all connections to ngIRCd +auth required pam_permit.so diff --git a/contrib/Debian/rules b/contrib/Debian/rules index 25f4828..868a042 100755 --- a/contrib/Debian/rules +++ b/contrib/Debian/rules @@ -163,6 +163,8 @@ install-ngircd-full: build-ngircd-full sed -e "s/;PidFile = \/var\/run\/ngircd\/ngircd.pid/PidFile = \/var\/run\/ircd\/ngircd.pid/g" \ >$(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.conf touch $(CURDIR)/debian/ngircd-full/etc/ngircd/ngircd.motd + mkdir -p $(CURDIR)/debian/ngircd-full/etc/pam.d + cp $(CURDIR)/debian/ngircd.pam $(CURDIR)/debian/ngircd-full/etc/pam.d/ngircd install-ngircd-full-dbg: build-ngircd-full-dbg dh_testdir @@ -183,6 +185,8 @@ install-ngircd-full-dbg: build-ngircd-full-dbg sed -e "s/;PidFile = \/var\/run\/ngircd\/ngircd.pid/PidFile = \/var\/run\/ircd\/ngircd.pid/g" \ >$(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.conf touch $(CURDIR)/debian/ngircd-full-dbg/etc/ngircd/ngircd.motd + mkdir -p $(CURDIR)/debian/ngircd-full-dbg/etc/pam.d + cp $(CURDIR)/debian/ngircd.pam $(CURDIR)/debian/ngircd-full-dbg/etc/pam.d/ngircd # Build architecture-independent files here. binary-indep: diff --git a/contrib/MacOSX/config.h b/contrib/MacOSX/config.h index 0da178d..ba5e7e6 100644 --- a/contrib/MacOSX/config.h +++ b/contrib/MacOSX/config.h @@ -115,6 +115,8 @@ #define HAVE_PAM_AUTHENTICATE 1 /* Define to 1 if you have the header file. */ #define HAVE_PAM_PAM_APPL_H 1 +/* Mac OS X <10.6 doesn't have pam_fail_delay() */ +#define NO_PAM_FAIL_DELAY 1 #endif /* -eof- */ diff --git a/contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj b/contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj index 5263c9e..98437c1 100644 --- a/contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj +++ b/contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj @@ -650,7 +650,14 @@ isa = PBXProject; buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "ngIRCd" */; compatibilityVersion = "Xcode 3.0"; + developmentRegion = English; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); mainGroup = 08FB7794FE84155DC02AAC07 /* ngIRCd */; projectDirPath = ""; projectReferences = ( @@ -733,7 +740,6 @@ GCC_WARN_UNUSED_VALUE = YES; INSTALL_PATH = /usr/local/bin; PRODUCT_NAME = ngIRCd; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Default; }; @@ -746,29 +752,28 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk"; }; name = Default; }; FAB0570C105D917F006AF9E2 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; - ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; GCC_DEBUGGING_SYMBOLS = full; GCC_OPTIMIZATION_LEVEL = 0; GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; + SDKROOT = ""; }; name = Debug; }; FAB0570D105D917F006AF9E2 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(NATIVE_ARCH_ACTUAL)"; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_NEWLINE = YES; @@ -788,9 +793,7 @@ GCC_WARN_UNUSED_PARAMETER = YES; GCC_WARN_UNUSED_VALUE = YES; INSTALL_PATH = /usr/local/bin; - ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = ngIRCd; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Debug; }; diff --git a/contrib/MacOSX/postinstall.sh b/contrib/MacOSX/postinstall.sh index 9cca7b4..a12169e 100755 --- a/contrib/MacOSX/postinstall.sh +++ b/contrib/MacOSX/postinstall.sh @@ -19,6 +19,20 @@ else fi chmod o-rwx /opt/ngircd/etc/ngircd.conf +if [ ! -e /opt/ngircd/etc/ngircd.pam ]; then + echo "Creating default PAM configuration: /opt/ngircd/etc/ngircd.pam" + echo "# PAM configuration for ngIRCd" >/opt/ngircd/etc/ngircd.pam + echo "" >>/opt/ngircd/etc/ngircd.pam + echo "auth required pam_permit.so" >>/opt/ngircd/etc/ngircd.pam + echo "#auth required pam_opendirectory.so" >>/opt/ngircd/etc/ngircd.pam +fi +chmod 644 /opt/ngircd/etc/ngircd.pam + +if [ ! -e /etc/pam.d/ngircd ]; then + echo "Linkint /opt/ngircd/etc/ngircd.pam to /etc/pam.d/ngircd" + ln -s /opt/ngircd/etc/ngircd.pam /etc/pam.d/ngircd || exit 1 +fi + if [ -f "$LDPLIST" ]; then echo "Fixing ownership and permissions of LaunchDaemon script ..." chown root:wheel "$LDPLIST" || exit 1 diff --git a/contrib/ngircd.spec b/contrib/ngircd.spec index 719eac4..c960ad4 100644 --- a/contrib/ngircd.spec +++ b/contrib/ngircd.spec @@ -1,5 +1,5 @@ %define name ngircd -%define version 17~rc2 +%define version 17~rc3 %define release 1 %define prefix %{_prefix} diff --git a/contrib/platformtest.sh b/contrib/platformtest.sh index d476595..432243a 100755 --- a/contrib/platformtest.sh +++ b/contrib/platformtest.sh @@ -52,15 +52,15 @@ if [ $? -ne 0 ]; then fi echo "$NAME: Checking for ./autogen.sh script ..." -if [ -e ./autogen.sh ]; then +if [ -r ./autogen.sh ]; then echo "$NAME: Running ./autogen.sh ..." [ -n "$VERBOSE" ] && ./autogen.sh || ./autogen.sh >/dev/null fi -if [ -e ./configure ]; then +if [ -r ./configure ]; then echo "$NAME: Running \"./configure\" script ..." [ -n "$VERBOSE" ] && ./configure || ./configure >/dev/null - if [ $? -eq 0 -a -e ./Makefile ]; then + if [ $? -eq 0 -a -r ./Makefile ]; then CONFIGURE=1 echo "$NAME: Running \"make\" ..." [ -n "$VERBOSE" ] && make || make >/dev/null @@ -96,9 +96,16 @@ if [ -r "Makefile" ]; then CC=$(grep "^CC = " Makefile | cut -d' ' -f3) $CC --version 2>&1 | grep -i "GCC" >/dev/null if [ $? -eq 0 ]; then - COMPILER=$($CC --version | head -n 1 | awk "{ print \$3 }" \ + COMPILER=$($CC --version | head -1 | awk "{ print \$3 }" \ | cut -d'-' -f1) COMPILER="gcc $COMPILER" + else + case "$CC" in + gcc*) + v="`$CC --version 2>/dev/null | head -1`" + [ -n "$v" ] && COMPILER="gcc $v" + ;; + esac fi fi @@ -137,7 +144,13 @@ echo " ./configure works --+ | | echo " | | | |" echo "Platform Compiler ngIRCd Date Tester C M T R See" echo "--------------------------- ------------ ---------- -------- ------ - - - - ---" -printf "%-27s %-12s %-10s %s %-6s %s %s %s %s%s" \ - "$PLATFORM" "$COMPILER" "$VERSION" "$DATE" "$USER" \ - "$C" "$M" "$T" "$R" "$COMMENT" +type printf >/dev/null 2>&1 +if [ $? -eq 0 ]; then + printf "%-27s %-12s %-10s %s %-6s %s %s %s %s%s" \ + "$PLATFORM" "$COMPILER" "$VERSION" "$DATE" "$USER" \ + "$C" "$M" "$T" "$R" "$COMMENT" +else + echo "$PLATFORM $COMPILER $VERSION $DATE $USER" \ + "$C" "$M" "$T" "$R" "$COMMENT" +fi echo; echo diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index bbb186e..2d5e129 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -207,7 +207,7 @@ cb_connserver(int sock, UNUSED short what) if (ng_ipaddr_af(&Conf_Server[server].dst_addr[0])) { /* more addresses to try... */ - New_Server(res, &Conf_Server[server].dst_addr[0]); + New_Server(server, &Conf_Server[server].dst_addr[0]); /* connection to dst_addr[0] is now in progress, so * remove this address... */ Conf_Server[server].dst_addr[0] = diff --git a/src/ngircd/pam.c b/src/ngircd/pam.c index e6d25bc..0d4f27f 100644 --- a/src/ngircd/pam.c +++ b/src/ngircd/pam.c @@ -111,7 +111,7 @@ PAM_Authenticate(CLIENT *Client) { pam_set_item(pam, PAM_RUSER, Client_User(Client)); pam_set_item(pam, PAM_RHOST, Client_Hostname(Client)); -#ifdef HAVE_PAM_FAIL_DELAY +#if defined(HAVE_PAM_FAIL_DELAY) && !defined(NO_PAM_FAIL_DELAY) pam_fail_delay(pam, 0); #endif