summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/samba/samba-4.1.12/06-fix-nmbd-systemd-status-update.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-connectivity/samba/samba-4.1.12/06-fix-nmbd-systemd-status-update.patch')
-rw-r--r--meta-oe/recipes-connectivity/samba/samba-4.1.12/06-fix-nmbd-systemd-status-update.patch97
1 files changed, 0 insertions, 97 deletions
diff --git a/meta-oe/recipes-connectivity/samba/samba-4.1.12/06-fix-nmbd-systemd-status-update.patch b/meta-oe/recipes-connectivity/samba/samba-4.1.12/06-fix-nmbd-systemd-status-update.patch
deleted file mode 100644
index 7a7bdf53c..000000000
--- a/meta-oe/recipes-connectivity/samba/samba-4.1.12/06-fix-nmbd-systemd-status-update.patch
+++ /dev/null
@@ -1,97 +0,0 @@
1From f73c906237aa0c9d45900d69d31c9b39261f062a Mon Sep 17 00:00:00 2001
2From: Andreas Schneider <asn@samba.org>
3Date: Tue, 16 Sep 2014 18:02:30 +0200
4Subject: [PATCH 1/2] lib: Add daemon_status() to util library.
5
6BUG: https://bugzilla.samba.org/show_bug.cgi?id=10816
7
8Signed-off-by: Andreas Schneider <asn@samba.org>
9Reviewed-by: Alexander Bokovoy <ab@samba.org>
10(cherry picked from commit 9f5f5fa8ebf845c53b7a92557d7aec56ed820320)
11---
12 lib/util/become_daemon.c | 11 +++++++++++
13 lib/util/samba_util.h | 6 ++++++
14 2 files changed, 17 insertions(+)
15
16diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c
17index 35c8b32..688bedd 100644
18--- a/lib/util/become_daemon.c
19+++ b/lib/util/become_daemon.c
20@@ -135,3 +135,14 @@ _PUBLIC_ void daemon_ready(const char *daemon)
21 #endif
22 DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve connections", daemon));
23 }
24+
25+_PUBLIC_ void daemon_status(const char *name, const char *msg)
26+{
27+ if (name == NULL) {
28+ name = "Samba";
29+ }
30+#ifdef HAVE_SYSTEMD
31+ sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
32+#endif
33+ DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
34+}
35diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h
36index e3fe6a6..f4216d8 100644
37--- a/lib/util/samba_util.h
38+++ b/lib/util/samba_util.h
39@@ -853,6 +853,12 @@ _PUBLIC_ void exit_daemon(const char *msg, int error);
40 **/
41 _PUBLIC_ void daemon_ready(const char *daemon);
42
43+/*
44+ * Report the daemon status. For example if it is not ready to serve connections
45+ * and is waiting for some event to happen.
46+ */
47+_PUBLIC_ void daemon_status(const char *name, const char *msg);
48+
49 /**
50 * @brief Get a password from the console.
51 *
52--
532.1.0
54
55
56From 7fcd74039961fa0fb02934bc87ce41fd98234f1a Mon Sep 17 00:00:00 2001
57From: Andreas Schneider <asn@samba.org>
58Date: Tue, 16 Sep 2014 18:03:51 +0200
59Subject: [PATCH 2/2] nmbd: Send waiting status to systemd.
60
61This tells the Administrator what's going on and we should log that IPv6
62is not supported.
63
64BUG: https://bugzilla.samba.org/show_bug.cgi?id=10816
65
66Signed-off-by: Andreas Schneider <asn@samba.org>
67Reviewed-by: Alexander Bokovoy <ab@samba.org>
68
69Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
70Autobuild-Date(master): Wed Sep 17 13:16:43 CEST 2014 on sn-devel-104
71
72(cherry picked from commit 2df601bff0d949e66c79366b8248b9d950c0b430)
73---
74 source3/nmbd/nmbd_subnetdb.c | 7 +++++--
75 1 file changed, 5 insertions(+), 2 deletions(-)
76
77diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
78index 311a240..6c483af 100644
79--- a/source3/nmbd/nmbd_subnetdb.c
80+++ b/source3/nmbd/nmbd_subnetdb.c
81@@ -247,8 +247,11 @@ bool create_subnets(void)
82
83 /* Only count IPv4, non-loopback interfaces. */
84 if (iface_count_v4_nl() == 0) {
85- DEBUG(0,("create_subnets: No local IPv4 non-loopback interfaces !\n"));
86- DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n"));
87+ daemon_status("nmbd",
88+ "No local IPv4 non-loopback interfaces "
89+ "available, waiting for interface ...");
90+ DEBUG(0,("NOTE: NetBIOS name resolution is not supported for "
91+ "Internet Protocol Version 6 (IPv6).\n"));
92 }
93
94 /* We only count IPv4, non-loopback interfaces here. */
95--
962.1.0
97