Skip to contentSkip to conversation

ypbind: remove bashisms from initscript

PATCH New Joe MacDonald 1 participant 3 messages Jul 17, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ypbind: remove bashisms from initscript

Remove three very minor bashisms, all about redirecting stdout/stderr. The initscript identifies as /bin/sh, this change ensures that the script should work with a non-bash /bin/sh as well.

---
 meta-networking/recipes-support/nis/files/ypbind-yocto.init | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta-networking/recipes-support/nis/files/ypbind-yocto.init +3 -3
index 5f50a53..2c50d12 100644
@@ -31,13 +31,13 @@ case "$1" in
 	echo -n "Starting ypbind"
 	## If the domainname is not set, skip starting of ypbind
 	## and return with "program not configured"
-        /bin/ypdomainname &> /dev/null
+        /bin/ypdomainname >/dev/null 2>&1
         if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
            if [ -f /etc/defaultdomain ]; then
              XDOMAINNAME=`cat /etc/defaultdomain`
              /bin/ypdomainname "$XDOMAINNAME"
 	   fi
-           /bin/ypdomainname &> /dev/null
+           /bin/ypdomainname >/dev/null 2>&1
            if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then
 	     # Tell the user this has skipped
 	     echo -n " . . . . . . . . . . No domainname set"
@@ -66,7 +66,7 @@ case "$1" in
         if [ $? -eq 0 ]; then
             notfound=1
             for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
-                ypwhich &>/dev/null && { notfound=0 ; break; };
+                ypwhich >/dev/null 2>&1 && { notfound=0 ; break; };
                 echo -n " ."
                 sleep 1;
             done
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/3 opensaf: add optional openhpi support

OpenSAF uses OpenHPI if available. If openhpi happens to be in PACKAGECONFIG from the build, turn on support in OpenSAF and add it to the DEPENDS list.

---
 meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-networking/recipes-daemons/opensaf/opensaf_4.5.0.bb +1 -0
index 3d0175e..686407a 100644
@@ -37,6 +37,7 @@ SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
 PACKAGECONFIG[systemd] = "--enable-systemd-daemon"
+PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
 
 do_configure_prepend () {
         ( cd ${S}; autoreconf -f -i -s )
Signature · 1 line
1.9.1
#2 lore raw

PATCH 3/3 znc: upgrade to 1.6.0

In reply to Joe MacDonald

From: Roy Li <[email protected]>

Upgrade to fix CVE-2014-9403
Remove backport patch
Add CSocket submodule, which split from znc
Add the dependency on icu

---

This is the cherry-pick of the cleaned-up version from master-next, it seems to have addressed the issues brought up on the list, so even though the patch has been rejected in patchworks, I think it's probably worth integrating these changes since it updates the recipe and resolves at least one CVE.

 ...-Fix-NULL-pointer-dereference-in-webadmin.patch | 58 ----------------------
 meta-networking/recipes-irc/znc/znc_git.bb         | 13 ++---
 2 files changed, 7 insertions(+), 64 deletions(-)
 delete mode 100644 meta-networking/recipes-irc/znc/znc/0001-Fix-NULL-pointer-dereference-in-webadmin.patch
meta-networking/recipes-irc/znc/znc/0001-Fix-NULL-pointer-dereference-in-webadmin.patch deleted +0 -58
deleted file mode 100644
index 68e4414..0000000
@@ -1,58 +0,0 @@
-Subject: [PATCH] Fix NULL pointer dereference in webadmin.
-
-Upstream-Status: Backport
-
-commit 2bd410ee5570cea127233f1133ea22f25174eb28 upstream
-
-Triggerable by any non-admin, if webadmin is loaded.
-
-The only affected version is 1.0
-
-Thanks to ChauffeR (Simone Esposito) for reporting this.
----
- modules/webadmin.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp
-index b793c02..816f217 100644
---- a/modules/webadmin.cpp
-+++ b/modules/webadmin.cpp
-@@ -419,7 +419,7 @@ public:
- 			CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
- 
- 			// Admin||Self Check
--			if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
-+			if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
- 				return false;
- 			}
- 
-@@ -448,7 +448,7 @@ public:
- 			CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
- 
- 			// Admin||Self Check
--			if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
-+			if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
- 				return false;
- 			}
- 
-@@ -472,7 +472,7 @@ public:
- 			CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
- 
- 			// Admin||Self Check
--			if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
-+			if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
- 				return false;
- 			}
- 
-@@ -486,7 +486,7 @@ public:
- 			CIRCNetwork* pNetwork = SafeGetNetworkFromParam(WebSock);
- 
- 			// Admin||Self Check
--			if (!spSession->IsAdmin() && (!spSession->GetUser() || spSession->GetUser() != pNetwork->GetUser())) {
-+			if (!spSession->IsAdmin() && (!spSession->GetUser() || !pNetwork || spSession->GetUser() != pNetwork->GetUser())) {
- 				return false;
- 			}
- 
--- 
-1.8.5.2.233.g932f7e4
-
meta-networking/recipes-irc/znc/znc_git.bb +7 -6
index 2e35e4d..d81c170 100644
@@ -1,16 +1,17 @@
 SUMMARY = "ZNC, an advanced IRC bouncer"
 SECTION = "net"
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-DEPENDS = "openssl"
+DEPENDS = "openssl zlib icu"
 
-PV = "1.0+git"
+PV = "1.6.0"
 
-SRCREV = "ef59c23068547c132cb678092fba9a21317fd5f2"
-SRC_URI = "git://github.com/znc/znc.git \
-           file://0001-Fix-NULL-pointer-dereference-in-webadmin.patch \
+SRC_URI = "git://github.com/znc/znc.git;name=znc \
+           git://github.com/jimloco/Csocket.git;destsuffix=git/third_party/Csocket;name=Csocket \
           "
+SRCREV_znc = "f47e8465efa4e1cd948b9caae93ac401b4355df8"
+SRCREV_Csocket = "07b4437396122650e5b8fb3d014e820a5decf4ee"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
1.9.1