--- nss-mdns-0.10.orig/src/nss.c +++ nss-mdns-0.10/src/nss.c @@ -69,7 +69,7 @@ #define ALIGN(idx) do { \ if (idx % sizeof(void*)) \ - idx += (sizeof(void*) - idx % sizeof(void*)); /* Align on 32 bit boundary */ \ + idx += (sizeof(void*) - idx % sizeof(void*)); /* Align on word boundary */ \ } while(0) struct userdata { @@ -514,7 +514,7 @@ result->h_length = address_length; /* Check if there's enough space for the addresses */ - if (buflen < idx+u.data_len+sizeof(char*)*(u.count+1)) { + if (buflen < idx+u.data_len+sizeof(char*)*(u.count+1)+sizeof(void*)) { *errnop = ERANGE; *h_errnop = NO_RECOVERY; status = NSS_STATUS_TRYAGAIN; @@ -525,9 +525,10 @@ astart = idx; l = u.count*address_length; memcpy(buffer+astart, &u.data, l); - /* address_length is a multiple of 32bits, so idx is still aligned - * correctly */ idx += l; + /* realign, whilst the address is a multiple of 32bits, we + * frequently lose alignment for 64bit systems */ + ALIGN(idx); /* Address array address_lenght is always a multiple of 32bits */ for (i = 0; i < u.count; i++) --- nss-mdns-0.10.orig/debian/libnss-mdns.docs +++ nss-mdns-0.10/debian/libnss-mdns.docs @@ -0,0 +1,2 @@ +doc/style.css +debian/build/main/doc/README.html --- nss-mdns-0.10.orig/debian/libnss-mdns.postinst +++ nss-mdns-0.10/debian/libnss-mdns.postinst @@ -0,0 +1,85 @@ +#!/bin/sh +set -e +#DEBHELPER# + +log() { + echo "$*" +} + +# try to insert mdns entries to the "hosts" line in /etc/nsswitch.conf to +# automatically enable nss-mdns support; do not change the configuration if the +# "hosts" line already references some mdns lookups +insert_mdns() { + log "Checking NSS setup..." + # abort if /etc/nsswitch.conf does not exist + if ! [ -e /etc/nsswitch.conf ]; then + log "Could not find /etc/nsswitch.conf." + return + fi + perl -i -pe ' + sub insert { + # this also splits on tab + my @bits=split(" ", shift); + # do not break configuration if the "hosts" line already references + # mdns + if (grep { $_ eq "mdns4_minimal" || $_ eq "mdns4" + || $_ eq "mdns" || $_ eq "mdns_minimal" + || $_ eq "mdns6" || $_ eq "mdns6_minimal"} @bits) { + return join " ", @bits; + } + # change "dns" into "mdns4_minimal [NOTFOUND=return] dns mdns4" + return join " ", map { + $_ eq "dns" ? ("mdns4_minimal","[NOTFOUND=return]",$_,"mdns4") : $_ + } @bits; + } + s/^(hosts:\s+)(.*)/$1.insert($2)/e; + ' /etc/nsswitch.conf +} + +action="$1" + +if [ configure = "$action" ]; then + if [ -z "$2" ]; then + log "First installation detected..." + # first install: setup the recommended configuration (unless + # nsswitch.conf already contains mdns entries) + insert_mdns + else + # upgrade + version="$2" + + if dpkg --compare-versions "$version" lt 0.8-4.2; then + log "Upgrade from unconfigured version detected." + # versions prior to 0.8-4.2 did not setup nss-mdns automatically, + # do it now + insert_mdns + elif dpkg --compare-versions "$version" lt 0.8-6; then + log "Already configured version detected, skipping NSS setup." + # versions 0.8-4.2 and 0.8-5 installed the same configuration as + # this postinst, so nothing needs to be done + : + elif dpkg --compare-versions "$version" lt 0.8-6.1; then + log "Upgrade from possibly broken version detected." + if [ -e /etc/nsswitch.conf ]; then + # version 0.8-6 broke the configuration in multiple ways: 1) + # for systems which were upgraded from 0.8-4.2 or 0.8-5 to + # 0.8-6, the hosts line will look like: + # hosts: files dns + # cleanup from this specially formatted line into the default + # one: + sed -i \ + 's/^hosts: files dns $/hosts: files dns/' \ + /etc/nsswitch.conf + # 2) for systems which re-installed 0.8-6 or installed 0.8-6 as the + # first version, the hosts line will look like: + # hosts: files mdns_minimal dns mdns + # cleanup from this specially formatted line into the default one: + sed -i -r \ + '/^hosts:/s/\/dns/' \ + /etc/nsswitch.conf + fi + + insert_mdns + fi + fi +fi --- nss-mdns-0.10.orig/debian/README.Debian +++ nss-mdns-0.10/debian/README.Debian @@ -0,0 +1,30 @@ +Packages automagically modifies /etc/nsswitch.conf +-------------------------------------------------- + +Previously the base-files package shipped /etc/nsswitch.conf and specified: + + hosts: files dns mdns + +However, due to bug#351990, this is no longer the case. /etc/nsswitch.conf +is now generated post-installation. Upon installation of nss-mdns, if the +strings 'mdns', 'mdns_minimal', 'mdns4', 'mdns4_minimal', 'mdns6' or +'mdns6_minimal' appear on the hosts line, your /etc/nsswitch.conf file +will not be updated, otherwise it will updated to match the upstream +recommended configuration which usually looks like: + + hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 + + +Sites with a .local DNS zone +---------------------------- + +Making nss-mdns authoritative for .local breaks resolution on networks +where .local is a real domain name. To workaround this, avahi-daemon +should be restarted when the DNS settings change (for example via +resolvconf and dhclient hooks) and disable itself when a SOA for the +.local zone is found. This is not currently implemented at the time of +writing, but should soon be. + +See also this excellent summary on the upstream website: + + --- nss-mdns-0.10.orig/debian/lib32nss-mdns.install +++ nss-mdns-0.10/debian/lib32nss-mdns.install @@ -0,0 +1,2 @@ +# from the m32 flavor +debian/install/m32/lib/*.so.* usr/lib32 --- nss-mdns-0.10.orig/debian/rules +++ nss-mdns-0.10/debian/rules @@ -0,0 +1,104 @@ +#!/usr/bin/make -f + +STAMP_DIR := debian/stampdir + +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +# list of flavors we build; each gets a builddir, a configure pass (configure +# args are defined below), a build pass, and an install pass (in two steps) +# Note: the main flavor is required +FLAVORS := main + +# 32-bits flavor for 32-bits programs such as Sun's Java; see #410052 +ifeq (amd64,$(DEB_HOST_ARCH)) +FLAVORS += m32 +endif + +# build dir for the current flavor; this is only expanded in flavor specific +# targets +# Note: dh_clean will rm -rf debian/tmp, hence all builds +builddir = $(buildbasedir)/$* +buildbasedir = $(CURDIR)/debian/build + +# install dir for the current flavor; this is only expanded in flavor specific +# targets +installdir = $(installbasedir)/$* +installbasedir = $(CURDIR)/debian/install + +configure_flags += \ + --prefix=/ \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/lib/nss-mdns \ + --disable-legacy \ + --build=$(DEB_BUILD_GNU_TYPE) +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + configure_flags += --host=$(DEB_HOST_GNU_TYPE) +endif + +common_cflags := -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2) +main_cflags := $(common_cflags) +m32_cflags := $(common_cflags) -m32 + +LDFLAGS += -Wl,-z,defs + +$(STAMP_DIR)/configure-stamp-%: + dh_testdir + mkdir -p $(builddir) + cd $(builddir) && \ + CFLAGS="$($*_cflags)" LDFLAGS="$(LDFLAGS)" \ + $(CURDIR)/configure $(configure_flags) + -mkdir -p $(STAMP_DIR) + touch $@ + +configure: $(addprefix $(STAMP_DIR)/configure-stamp-, $(FLAVORS)) + +$(STAMP_DIR)/build-stamp-%: $(STAMP_DIR)/configure-stamp-% + dh_testdir + $(MAKE) -C $(builddir) + touch $@ + +build: $(addprefix $(STAMP_DIR)/build-stamp-, $(FLAVORS)) + +$(STAMP_DIR)/install-stamp-%: $(STAMP_DIR)/build-stamp-% + mkdir -p $(installdir) + $(MAKE) -C $(builddir) install DESTDIR=$(installdir) + touch $@ + +install: $(addprefix $(STAMP_DIR)/install-stamp-, $(FLAVORS)) + +clean: + dh_testdir + dh_testroot + # remove install and build dirs + rm -rf $(installbasedir) + rm -rf $(buildbasedir) + -rm -rf $(STAMP_DIR) + dh_clean + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs -s + dh_installdocs -s + dh_install -s + dh_installman -s + dh_link -s + dh_strip -s + dh_compress -s + dh_fixperms -s + dh_makeshlibs -s + dh_installdeb -s + dh_shlibdeps -s + dh_gencontrol -s + dh_md5sums -s + dh_builddeb -s + +binary: binary-indep binary-arch +.PHONY: configure build install clean binary-indep binary-arch binary --- nss-mdns-0.10.orig/debian/libnss-mdns.postrm +++ nss-mdns-0.10/debian/libnss-mdns.postrm @@ -0,0 +1,43 @@ +#!/bin/sh +set -e +#DEBHELPER# + +log() { + echo "$*" +} + +remove_mdns() { + log "Checking NSS setup..." + # abort if /etc/nsswitch.conf does not exist + if ! [ -e /etc/nsswitch.conf ]; then + log "Could not find /etc/nsswitch.conf." + return + fi + perl -i -pe ' + my @remove=( + "mdns4_minimal [NOTFOUND=return]", + "mdns4_minimal", + "mdns4", + "mdns6_minimal [NOTFOUND=return]", + "mdns6_minimal", + "mdns6", + "mdns_minimal [NOTFOUND=return]", + "mdns_minimal", + "mdns", + ); + sub remove { + my $s=shift; + foreach my $bit (@remove) { + $s=~s/\s+\Q$bit\E//g; + } + return $s; + } + s/^(hosts:)(.*)/$1.remove($2)/e; + ' /etc/nsswitch.conf +} + +action="$1" + +if [ "$action" = remove ]; then + remove_mdns +fi --- nss-mdns-0.10.orig/debian/NOTES.Debian +++ nss-mdns-0.10/debian/NOTES.Debian @@ -0,0 +1,93 @@ +Upgrade implementation notes +============================ + +The first version in Debian was 0.3-2. + +Postinst +======== + +Starting with version 0.8-4.2 inclusive, the package started touching +/etc/nsswitch.conf in debian/postinst. + +In versions 0.8-4.2, for first installs and upgrades from versions lower or +equal to 0.8-4.1, the postinst would: +- avoid doing anything if any of "mdns4_minimal", "mdns4", "mdns", + "mdns_minimal", "mdns6", "mdns6_minimal" was found in the hosts line; that + is, manually configured /etc/nsswitch.conf were kept intact +- otherwise change the "dns" entry in /etc/hosts into: + "mdns4_minimal [NOTFOUND=return] dns mdns4" + +Problems with this version: +1) does not preserve spacing ("foo bar" becomes "foo bar") +2) breaks local reaction overrides ("[STATUS=ACTION]") + +In version 0.8-5, the postinst is identical to the postinst of version 0.8-4.2. + +In version 0.8-6, the postinst was really messed up: +* for first installs: + - avoid doing anything if any of "mdns4_minimal", "mdns4", "mdns", + "mdns_minimal", "mdns6", "mdns6_minimal" was found in the hosts line; that + is, manually configured /etc/nsswitch.conf were kept intact + - otherwise change the "dns" entry in /etc/hosts into: + "mdns_minimal dns mdns" + - if the hosts line contained "... mdns4_minimal [NOTFOUND=return] ... dns + ... mdns4 ...", remove these "mdns4_minimal [NOTFOUND=return]" and "mdns4" + entries +* for upgrades from versions lower or equal to 0.8-4.1: + - avoid doing anything if any of "mdns4_minimal", "mdns4", "mdns", + "mdns_minimal", "mdns6", "mdns6_minimal" was found in the hosts line; that + is, manually configured /etc/nsswitch.conf were kept intact + - otherwise change the "dns" entry in /etc/hosts into: + "mdns_minimal dns mdns" +* for upgrades from versions 0.8-4.2 and 0.8-5: + - if the hosts line contained "... mdns4_minimal [NOTFOUND=return] ... dns + ... mdns4 ...", remove these "mdns4_minimal [NOTFOUND=return]" and "mdns4" + entries +* for upgrades from versions higher or equal to 0.8-6 (i.e. reinstalls of + 0.8-6!): + - avoid doing anything if any of "mdns4_minimal", "mdns4", "mdns", + "mdns_minimal", "mdns6", "mdns6_minimal" was found in the hosts line; that + is, manually configured /etc/nsswitch.conf were kept intact + - otherwise change the "dns" entry in /etc/hosts into: + "mdns_minimal dns mdns" + +Problems with this version: +1) does not preserve spacing ("foo bar" becomes "foo bar") in many cases +2) breaks local reaction overrides ("[STATUS=ACTION]") in many cases +3) does not handle all versions (e.g. local versions, versions from Ubuntu) +4) installs a configuration which does not match the upstream recommendations + for new installs or upgrades from >= 0.8-4.1 +5) removes any local or automatic configuration and breaks the mdns setup when + upgrading from versions 0.8-4.2 and 0.8-5 +6) results in ugly spacing when upgrading from versions 0.8-4.2 and 0.8-5 (note + the trailing space and the double space between files and dns): + hosts: files dns + +In version 0.8-6.1 and later, the postinst would: +- if upgrading from 0.8-6: + - revert breakage introduced in 0.8-6 + - avoid doing anything if any of "mdns4_minimal", "mdns4", "mdns", + "mdns_minimal", "mdns6", "mdns6_minimal" was found in the hosts line; that + is, manually configured /etc/nsswitch.conf were kept intact + - otherwise change the "dns" entry in /etc/hosts into: + "mdns4_minimal [NOTFOUND=return] dns mdns4" +- for first installs and upgrades from versions lower than + 0.8-4.2, the postinst would: + - avoid doing anything if any of "mdns4_minimal", "mdns4", "mdns", + "mdns_minimal", "mdns6", "mdns6_minimal" was found in the hosts line; that + is, manually configured /etc/nsswitch.conf were kept intact + - otherwise change the "dns" entry in /etc/hosts into: + "mdns4_minimal [NOTFOUND=return] dns mdns4" + + +Postrm +====== + +Concerning postrm, one was introduced in version 0.8-4.2 to remove any +keyword from a set of mdns keywords from the "hosts:" line of nsswitch.conf +during purge. This postinst snippet was dropped in 0.8-6. + +In version 0.9-0.1, the same snippet was reintroduced, but is run on package +removal instead of purge to ensure perl is still present and to avoid DNS +issues in case of a removed package. + --- nss-mdns-0.10.orig/debian/changelog +++ nss-mdns-0.10/debian/changelog @@ -0,0 +1,274 @@ +nss-mdns (0.10-3.2) unstable; urgency=low + + * NMU. + * Drop perl dependancy, only perl-base is needed. + (Closes: #580394, #603581) + * Include a patch that fixes unaligned access on successful lookups on + interesting 64-bit systems. (Closes: #521184) + + -- Steve Kowalik Sat, 10 Sep 2011 17:04:29 +1000 + +nss-mdns (0.10-3.1) unstable; urgency=low + + * NMU + * Move biarch files to /usr/lib32. closes: #533013. + * Have lib32nss-mdns conflict with libc6-i386 (<= 2.9-18). + * Bump to Standards-Version 3.8.2. + + -- Clint Adams Sun, 02 Aug 2009 11:54:57 -0400 + +nss-mdns (0.10-3) unstable; urgency=low + + * Upload to unstable. + + -- Loic Minier Tue, 10 Jul 2007 13:38:15 +0200 + +nss-mdns (0.10-2) experimental; urgency=low + + * Rework the build process completely to be able to build multiple flavors; + build a "main" flavor and an addition "m32" flavor for amd64 which is + installed in a new lib32nss-mdns package for 32-bits compatibility; + build-depend on gcc-mutilib; initial patch proposed by Goswin von + Brederlow; closes: #410052. + + -- Loic Minier Mon, 02 Jul 2007 21:42:31 +0200 + +nss-mdns (0.10-1) unstable; urgency=low + + * Set Utopia Maintenance Team as Maintainer and add Sjoerd and myself as + Uploaders. + * Ack NMU. + * Bump Debhelper compatibility level to 5. + * Misc cleanups. + * Wrap fields in control. + * Add ${misc:Depends}. + * Switch to a multi-binaries layout for the packaging. + * Split the definition of configure flags and LDFLAGS. + * Drop -DNDEBUG=1 from CFLAGS; seems risky in a package build. + * Only pass --host to configure if DEB_HOST_GNU_TYPE and DEB_BUILD_GNU_TYPE + differ. + * Add watch file. + + -- Loic Minier Fri, 22 Jun 2007 18:28:22 +0200 + +nss-mdns (0.10-0.1) unstable; urgency=high + + * NMU + * New upstream release + * Fixes alignment problems on sparc causing sigBUS (Closes: #423222) + + -- Sjoerd Simons Sun, 13 May 2007 10:23:16 +0200 + +nss-mdns (0.9-0.2) unstable; urgency=high + + * Non-maintainer upload to fix a RC bug. + * Configure with a prefix of / instead of /usr as libnss-mdns needs to be in + /lib for the resolver to work correctly during boot; this is also needed + for chrooted processes such as Postfix's smtpd which uses a copy of the + NSS libs as well of the NSS configuration and fails when mdns is missing + in the chroot but referenced in nsswitch.conf. Update other configured + dirs (mandir, infodir, sysconfdir) as well, but these are currently not + used. + + -- Loic Minier Thu, 22 Feb 2007 14:48:45 +0100 + +nss-mdns (0.9-0.1) unstable; urgency=high + + * Non-maintainer upload to fix broken dependencies in the 0.8-6.1 NMU. + * Fix Depends on perl and avahi-daemon. + * Bump up dependency on avahi-daemon to >= 0.6.16-1 for the auto-disabling + functionality on sites with a .local SOA. + * New upstream release. + - Does not export unnecessary symbols and fixes segfault in nmbclient + which had symbols with the same name; closes: #404266. + - Does not use the "search" keyword of resolv.conf anymore; + closes: #404534, #405327. + * Re-add a postrm to cleanup the mdns_* entries from nsswitch.conf but act on + package removal instead of purge to avoid breaking the DNS when the lib is + removed and to ensure perl is still present; closes: #406198. + * Document the changes made to postinst in NOTES.Debian and document the + history of the postrm as well. + * Updates to README.Debian; add upstream URL for troubleshooting. + + -- Loic Minier Tue, 9 Jan 2007 18:45:27 +0100 + +nss-mdns (0.8-6.1) unstable; urgency=low + + * Non-maintainer upload to fix a long-standing RC bug and to beat the + package into shape before etch with suggestions from upstream; thanks + Lennart Poettering. + * Configure with --disable-legacy, as recommended by upstream for security + reasons; the legacy mode might be offered in a separate binary package for + the corner cases where it can be useful; see full discussion in #393711; + depend on avahi-daemon as nss-mdns will not work without avahi when + compiled like this; closes: #399297. + * Only suggest zeroconf instead of Recommending it: even if it can act as a + nice complement to nss-mdns, it is intrusive and orthogonal to nss-mdns + and conflicts with avahi-autoipd; closes: #353131, #392590. + * Suggest avahi-autoipd as an alternative to zeroconf. + * Remove offensive comments in postinst and README.Debian. + * Document the history of postinst snippets in debian/NOTES.Debian to permit + handling all upgrade paths. + * Depend on Perl for the postinst snippets using the perl interpreter. + * Rewrite postinst to handle all upgrade paths. + - Does not wipe NSS configuration which matches the upstream recommended + configuration during upgrades from versions 0.8-4.2 or 0.8-5; + closes: #393608. + - Install the upstream recommended configuration for first installs and + upgrades from versions which did not automatically insert mdns in the + NSS setup (unless mdns is already setup); closes: #393711. + - Keep configuration intact when upgrading from versions which installed + the upstream recommended configuration. + - Remove whitespaces added in upgrades from version 0.8-4.2 or 0.8-5 to + 0.8-6. + - For upgrades from 0.8-6, attempt to revert the problematic "mdns_minimal + dns mdns" configuration and to install the upstream recommended + configuration. + * Update README.Debian to match the above changes and a planned changes in + avahi-daemon which should disable itself if a .local SOA is found after a + change in the DNS settings. + + -- Loic Minier Sun, 24 Dec 2006 20:27:30 +0100 + +nss-mdns (0.8-6) unstable; urgency=medium + + * Revert hostile package takeover. + * "Unbreak the world" (Closes: #392813) + + "So whether nss-mdns does or doesn't support "search local" is of no + concern to me -- I just doesn't want it to interfere with my otherwise + working setup." + + Walter Hofmann on Joey Hess and Sjoerd Simons' period of maintainence + + * Revert switch to CDBS. + * Switch to using a sane /etc/nsswitch.conf + so we don't break existing setups, or those over which the user has + no control. + * Revert "clarifications" as well. + * Recommend, once again, zeroconf. + + -- Anand Kumria Mon, 16 Oct 2006 12:18:55 +1000 + +nss-mdns (0.8-5) unstable; urgency=low + + * Take over the package for the pkg-utopia team. T + * Acknowledge NMU's (Closes: #388864, #351990, #353131, #378608) + * Switch to cdbs. As a side-effect the sysconfdir and localstatedir are set + correctly (Closes: #387231) + * debian/patches/00_dns_unaligned_access.patch: + - Added. Prevent unaligned access when creating/parsing dns packets. + + -- Sjoerd Simons Wed, 11 Oct 2006 11:32:46 +0200 + +nss-mdns (0.8-4.2) unstable; urgency=low + + * NMU + * Add postinst that will add mdns entries to /etc/nsswitch.conf on new + installs and on upgrades from the previous version. Closes: #388864, + #351990 + * Add postrm to remove mdns entries from /etc/nsswitch.conf when the package + is removed. + * Local modifications to the file will be preserved accross upgrades. + * Depend on base-files 3.1.10 or higher to get a nsswitch.conf that is not a + conffile and that doesn't have mdns entries from base-files in it. + * Switch to nsswitch line recommended by upstream in #388864 after getting + clarification from upstream, and update README.Debian. + * Remove recommends on zeroconf. Closes: #353131 + + -- Joey Hess Fri, 22 Sep 2006 21:10:25 -0400 + +nss-mdns (0.8-4.1) unstable; urgency=low + + * NMU + * Clear out the diff.gz so it doesn't patch the various autotools files, + which makes everything explode on build (Closes: #378608) + + -- Sjoerd Simons Fri, 8 Sep 2006 09:51:57 +0200 + +nss-mdns (0.8-4) unstable; urgency=low + + * Forget about using CDBS and use debhelper directly so we have control of + what is being built and updated. (Closes: #378608) + + -- Anand Kumria Sun, 13 Aug 2006 12:24:32 +1000 + +nss-mdns (0.8-3) unstable; urgency=low + + * Regenerate the Debian .diff.gz so the Debian build system doesn't barf and + die + + -- Anand Kumria Sun, 13 Aug 2006 09:49:39 +1000 + +nss-mdns (0.8-2) unstable; urgency=low + + * Copy 'configure' from the upstream tarball since the CDBS regeneration has + gone awry and does not work. This is the simple fix -- a more robust one + will be in place shortly. Thanks to Sam Morris for the diagnosis. + (Closes: #378608) + + -- Anand Kumria Sun, 13 Aug 2006 09:40:48 +1000 + +nss-mdns (0.8-1) unstable; urgency=low + + * New upstream release (Closes: #369827) + * Enable "minimal" mDNS mode -- Debian has had this for a while but + upstream have now incorporated it. This should mean that mdns + can now be mentioned in /etc/nsswitch.conf without issue. + (Closes: #348578, #348580) + * Suggest avahi-daemon rather than nscd (Closes: #367275) + + -- Anand Kumria Mon, 3 Jul 2006 03:55:05 +1000 + +nss-mdns (0.7-1) unstable; urgency=low + + * New upstream release + + -- Anand Kumria Tue, 27 Dec 2005 06:42:42 +1100 + +nss-mdns (0.6-2) unstable; urgency=low + + * Enable Avahi connections + + -- Anand Kumria Mon, 12 Sep 2005 20:59:52 +1000 + +nss-mdns (0.6-1) unstable; urgency=low + + * New upstream release + + -- Anand Kumria Fri, 2 Sep 2005 03:58:34 +1000 + +nss-mdns (0.5-1) unstable; urgency=low + + * New upstream release (Closes: #313024) + + -- Anand Kumria Thu, 16 Jun 2005 17:38:13 +1000 + +nss-mdns (0.4-1) unstable; urgency=low + + * New upstream release + * Fix endian issues (Closes: #305465) + + -- Anand Kumria Mon, 16 May 2005 05:12:09 +1000 + +nss-mdns (0.3-2) unstable; urgency=low + + * Modify Maintainer to point to me. + * Recommend 'zeroconf' + * Remove i386 specific int3 debug hack. + * Update to standard 3.6.1 + * Reclose RFP (Closes: #284497) + + -- Anand Kumria Mon, 7 Mar 2005 01:27:04 +1100 + +nss-mdns (0.3-1) unstable; urgency=low + + * Update to current upstream + + -- Lennart Poettering Sun, 16 Jan 2005 14:57:28 +0100 + +nss-mdns (0.1-0) unstable; urgency=low + + * Initial Release (Closes: #284497). + + -- Jeff Waugh Tue, 07 Dec 2004 12:42:51 +0100 --- nss-mdns-0.10.orig/debian/watch +++ nss-mdns-0.10/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-([\d.]+).tar.gz --- nss-mdns-0.10.orig/debian/libnss-mdns.install +++ nss-mdns-0.10/debian/libnss-mdns.install @@ -0,0 +1,2 @@ +# from the main flavor +debian/install/main/lib/*.so.* lib --- nss-mdns-0.10.orig/debian/compat +++ nss-mdns-0.10/debian/compat @@ -0,0 +1 @@ +5 --- nss-mdns-0.10.orig/debian/copyright +++ nss-mdns-0.10/debian/copyright @@ -0,0 +1,9 @@ +This package was debianized by Jeff Waugh on +Tue, 07 Dec 2004 12:45:24 +0100. + +It was downloaded from + +Copyright (C) 2004, Lennart Poettering + +On Debian systems, the complete text of the GNU Lesser General Public License +can be found in `/usr/share/common-licenses/LGPL'. --- nss-mdns-0.10.orig/debian/control +++ nss-mdns-0.10/debian/control @@ -0,0 +1,43 @@ +Source: nss-mdns +Section: admin +Priority: optional +Maintainer: Utopia Maintenance Team +Uploaders: Loic Minier , + Sjoerd Simons +Build-Depends: debhelper (>= 5), + lynx, + gcc-multilib [amd64] +Standards-Version: 3.8.2 + +Package: libnss-mdns +Section: admin +Depends: ${shlibs:Depends}, + ${misc:Depends}, + base-files (>= 3.1.10), + avahi-daemon (>= 0.6.16-1) +Suggests: avahi-autoipd | zeroconf +Architecture: any +Description: NSS module for Multicast DNS name resolution + nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality + of the GNU C Library (glibc) providing host name resolution via Multicast + DNS (using Zeroconf, aka Apple Bonjour / Apple Rendezvous ), effectively + allowing name resolution by common Unix/Linux programs in the ad-hoc mDNS + domain .local. + +Package: lib32nss-mdns +Section: admin +Depends: ${shlibs:Depends}, + ${misc:Depends}, + base-files (>= 3.1.10), + avahi-daemon (>= 0.6.16-1) +Suggests: avahi-autoipd | zeroconf +Conflicts: libc6-i386 (<= 2.9-18) +Architecture: amd64 +Description: NSS module for Multicast DNS name resolution (32-bits version) + nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality + of the GNU C Library (glibc) providing host name resolution via Multicast + DNS (using Zeroconf, aka Apple Bonjour / Apple Rendezvous ), effectively + allowing name resolution by common Unix/Linux programs in the ad-hoc mDNS + domain .local. + . + This package is built for 32-bits environments. --- nss-mdns-0.10.orig/debian/patches/01_ia64_alignment.patch +++ nss-mdns-0.10/debian/patches/01_ia64_alignment.patch @@ -0,0 +1,33 @@ +--- src/nss.c 2007-05-13 00:43:48.000000000 +1000 ++++ src/nss.c 2009-03-26 02:08:57.944206926 +1100 +@@ -69,7 +69,7 @@ + + #define ALIGN(idx) do { \ + if (idx % sizeof(void*)) \ +- idx += (sizeof(void*) - idx % sizeof(void*)); /* Align on 32 bit boundary */ \ ++ idx += (sizeof(void*) - idx % sizeof(void*)); /* Align on word boundary */ \ + } while(0) + + struct userdata { +@@ -514,7 +514,7 @@ + result->h_length = address_length; + + /* Check if there's enough space for the addresses */ +- if (buflen < idx+u.data_len+sizeof(char*)*(u.count+1)) { ++ if (buflen < idx+u.data_len+sizeof(char*)*(u.count+1)+sizeof(void*)) { + *errnop = ERANGE; + *h_errnop = NO_RECOVERY; + status = NSS_STATUS_TRYAGAIN; +@@ -525,9 +525,10 @@ + astart = idx; + l = u.count*address_length; + memcpy(buffer+astart, &u.data, l); +- /* address_length is a multiple of 32bits, so idx is still aligned +- * correctly */ + idx += l; ++ /* realign, whilst the address is a multiple of 32bits, we ++ * frequently lose alignment for 64bit systems */ ++ ALIGN(idx); + + /* Address array address_lenght is always a multiple of 32bits */ + for (i = 0; i < u.count; i++) --- nss-mdns-0.10.orig/debian/patches/00_dns_unaligned_access.patch +++ nss-mdns-0.10/debian/patches/00_dns_unaligned_access.patch @@ -0,0 +1,120 @@ +Index: src/dns.c +=================================================================== +--- src/dns.c (revision 102) ++++ src/dns.c (working copy) +@@ -32,6 +32,33 @@ + + #include "dns.h" + ++#define SET_16_P(data, value) \ ++ do { \ ++ uint16_t __value = value; \ ++ memcpy(data, &__value, sizeof(uint16_t)); \ ++ } while(0) ++ ++#define SET_16(data, idx, value) \ ++ SET_16_P(((uint8_t *)data) + idx * sizeof(uint16_t)/sizeof(uint8_t), value) ++ ++#define GET_16_P(data, value) \ ++ do { \ ++ uint8_t *__value = ((uint8_t *)&value); \ ++ memcpy(__value, data, sizeof(uint16_t)); \ ++ } while(0) ++ ++#define GET_16(data, idx, value) \ ++ GET_16_P(((uint8_t *)data) + idx * sizeof(uint16_t)/sizeof(uint8_t), value) ++ ++#define GET_32_P(data, value) \ ++ do { \ ++ uint8_t *__value = ((uint8_t *)&value); \ ++ memcpy(__value, data, sizeof(uint32_t)); \ ++ } while(0) ++ ++#define GET_32(data, idx, value) \ ++ GET_32_P(((uint8_t *)data) + idx * sizeof(uint32_t)/sizeof(uint8_t), value) ++ + struct dns_packet* dns_packet_new(void) { + struct dns_packet *p; + +@@ -51,15 +78,19 @@ + void dns_packet_set_field(struct dns_packet *p, unsigned idx, uint16_t v) { + assert(p); + assert(idx < 2*6); ++ + +- ((uint16_t*) p->data)[idx] = htons(v); ++ SET_16(p->data, idx, htons(v)); + } + + uint16_t dns_packet_get_field(struct dns_packet *p, unsigned idx) { + assert(p); + assert(idx < 2*6); ++ uint16_t r; + +- return ntohs(((uint16_t*) p->data)[idx]); ++ GET_16(p->data, idx, r); ++ ++ return ntohs(r); + } + + uint8_t* dns_packet_append_name(struct dns_packet *p, const char *name) { +@@ -102,7 +133,7 @@ + assert(p); + + d = dns_packet_extend(p, sizeof(uint16_t)); +- *((uint16_t*) d) = htons(v); ++ SET_16_P(d, htons(v)); + + return d; + } +@@ -120,7 +151,7 @@ + } + + uint8_t *dns_packet_append_name_compressed(struct dns_packet *p, const char *name, uint8_t *prev) { +- int16_t *d; ++ uint8_t *d; + signed long k; + assert(p); + +@@ -131,8 +162,8 @@ + if (k < 0 || k >= 0x4000 || (size_t) k >= p->size) + return dns_packet_append_name(p, name); + +- d = (int16_t*) dns_packet_extend(p, sizeof(uint16_t)); +- *d = htons((0xC000 | k)); ++ d = dns_packet_extend(p, sizeof(uint16_t)); ++ SET_16_P(d, htons((0xC000 | k))); + + return prev; + } +@@ -246,11 +277,13 @@ + + int dns_packet_consume_uint16(struct dns_packet *p, uint16_t *ret_v) { + assert(p && ret_v); ++ uint16_t r; + + if (p->rindex + sizeof(uint16_t) > p->size) + return -1; +- +- *ret_v = ntohs(*((uint16_t*) (p->data + p->rindex))); ++ ++ GET_16_P(p->data + p->rindex, r); ++ *ret_v = ntohs(r); + p->rindex += sizeof(uint16_t); + + return 0; +@@ -258,11 +291,13 @@ + + int dns_packet_consume_uint32(struct dns_packet *p, uint32_t *ret_v) { + assert(p && ret_v); ++ uint32_t r; + + if (p->rindex + sizeof(uint32_t) > p->size) + return -1; + +- *ret_v = ntohl(*((uint32_t*) (p->data + p->rindex))); ++ GET_32_P(p->data + p->rindex, r); ++ *ret_v = ntohl(r); + p->rindex += sizeof(uint32_t); + + return 0;