[Pkg-samba-maint] r4110 - in trunk/samba/debian: . patches
bubulle at alioth.debian.org
bubulle at alioth.debian.org
Thu May 31 20:23:16 UTC 2012
tags 640668 pending
tags 640508 pending
thanks
Author: bubulle
Date: 2012-05-31 20:23:16 +0000 (Thu, 31 May 2012)
New Revision: 4110
Added:
trunk/samba/debian/patches/libutil_drop_AI_ADDRCONFIG.patch
Removed:
trunk/samba/debian/samba.if-up
Modified:
trunk/samba/debian/changelog
trunk/samba/debian/patches/series
Log:
Add libutil_drop_AI_ADDRCONFIG.patch that allows running nmbd when
no network interfaces have been assigned an address, therefore
removing the need for an if-up script. Closes: #640668,#640508
Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog 2012-05-31 19:53:05 UTC (rev 4109)
+++ trunk/samba/debian/changelog 2012-05-31 20:23:16 UTC (rev 4110)
@@ -1,4 +1,4 @@
-samba (2:3.6.5-4) UNRELEASED; urgency=low
+samba (2:3.6.5-5) UNRELEASED; urgency=low
[ Christian Perrier ]
* Make libpam-winbind depend on libnss-winbind.
@@ -16,8 +16,13 @@
[ Luk Claes ]
* Ship wbclient.pc file in multiarch safe directory (Closes: #674215).
- -- Christian Perrier <bubulle at debian.org> Fri, 18 May 2012 08:45:13 +0200
+ [ Sam Morris ]
+ * Add libutil_drop_AI_ADDRCONFIG.patch that allows running nmbd when
+ no network interfaces have been assigned an address, therefore
+ removing the need for an if-up script. Closes: #640668,#640508
+ -- Christian Perrier <bubulle at debian.org> Thu, 31 May 2012 22:20:18 +0200
+
samba (2:3.6.5-3) unstable; urgency=low
[ Luk Claes ]
Added: trunk/samba/debian/patches/libutil_drop_AI_ADDRCONFIG.patch
===================================================================
--- trunk/samba/debian/patches/libutil_drop_AI_ADDRCONFIG.patch (rev 0)
+++ trunk/samba/debian/patches/libutil_drop_AI_ADDRCONFIG.patch 2012-05-31 20:23:16 UTC (rev 4110)
@@ -0,0 +1,54 @@
+From 185cd4c79492a7de5988f9407d764cdb3a0e2e10 Mon Sep 17 00:00:00 2001
+From: Simo Sorce <idra at samba.org>
+Date: Wed, 11 May 2011 17:50:07 -0400
+Subject: [PATCH] libutil: use AI_ADDRCONFIG only when AI_NUMERIC is not defined
+
+This flag prevents startup w/o ip addresses assigned to any interface.
+If AI_NUMERIC is passed it should be safe to avoid it.
+
+Signed-off-by: Andreas Schneider <asn at samba.org>
+---
+ lib/util/util_net.c | 16 +++++++++++-----
+ 1 files changed, 11 insertions(+), 5 deletions(-)
+
+Index: samba/lib/util/util_net.c
+===================================================================
+--- samba.orig/lib/util/util_net.c
++++ samba/lib/util/util_net.c
+@@ -64,10 +64,9 @@
+ ppres);
+
+ if (ret) {
+- DEBUG(3,("interpret_string_addr_internal: getaddrinfo failed "
+- "for name %s [%s]\n",
+- str,
+- gai_strerror(ret) ));
++ DEBUG(3, ("interpret_string_addr_internal: "
++ "getaddrinfo failed for name %s (flags %d) [%s]\n",
++ str, flags, gai_strerror(ret)));
+ return false;
+ }
+ return true;
+@@ -88,6 +87,7 @@
+ #if defined(HAVE_IPV6)
+ char addr[INET6_ADDRSTRLEN];
+ unsigned int scope_id = 0;
++ int int_flags;
+
+ if (strchr_m(str, ':')) {
+ char *p = strchr_m(str, '%');
+@@ -108,7 +108,13 @@
+
+ zero_sockaddr(pss);
+
+- if (!interpret_string_addr_internal(&res, str, flags|AI_ADDRCONFIG)) {
++ if (flags & AI_NUMERICHOST) {
++ int_flags = flags;
++ } else {
++ int_flags = flags|AI_ADDRCONFIG;
++ }
++
++ if (!interpret_string_addr_internal(&res, str, int_flags)) {
+ return false;
+ }
+ if (!res) {
Modified: trunk/samba/debian/patches/series
===================================================================
--- trunk/samba/debian/patches/series 2012-05-31 19:53:05 UTC (rev 4109)
+++ trunk/samba/debian/patches/series 2012-05-31 20:23:16 UTC (rev 4110)
@@ -20,4 +20,5 @@
bug_604768_upstream_7826_fix-WHATSNEW-link.patch
waf-as-source.patch
smbtorture-manpage.patch
+libutil_drop_AI_ADDRCONFIG.patch
shadow_copy2_backport.patch
Deleted: trunk/samba/debian/samba.if-up
===================================================================
--- trunk/samba/debian/samba.if-up 2012-05-31 19:53:05 UTC (rev 4109)
+++ trunk/samba/debian/samba.if-up 2012-05-31 20:23:16 UTC (rev 4110)
@@ -1,33 +0,0 @@
-#!/bin/sh
-# Try to bring nmbd up when an interface comes up, if smbd is already running.
-
-# Don't bother to do anything for lo.
-if [ "$IFACE" = lo ]; then
- exit 0
-fi
-
-# Only run from ifup.
-if [ "$MODE" != start ]; then
- exit 0
-fi
-
-# Samba only cares about inet and inet6. Get thee gone, strange people
-# still using ipx.
-case $ADDRFAM in
- inet|inet6|NetworkManager)
- ;;
- *)
- exit 0
- ;;
-esac
-
-status=$(/etc/init.d/samba status)
-
-# Really only necessary to do anything if nmbd is not already running
-if echo "$status" | grep -q 'smbd is running' \
- && ! echo "$status" | grep -q 'nmbd is running'
-then
- /etc/init.d/samba start
-fi
-
-exit 0
More information about the Pkg-samba-maint
mailing list