[oe-commits] [openembedded-core] 16/53: cdrtools-native: Don't set uid/gid during install

git at git.openembedded.org git at git.openembedded.org
Thu Nov 21 21:39:27 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 5db7b80140410cd3c164e4522dc87df92fac93b0
Author: Paul Barker <paul at betafive.co.uk>
AuthorDate: Fri Nov 15 13:00:48 2019 +0000

    cdrtools-native: Don't set uid/gid during install
    
    This is a native recipe so won't be installed as root.
    
    If the string 'root' is part of the username then the install script
    can get tricked into thinking we are root (regardless of the actual
    uid or permissions) resulting in attempts to run chown/chgrp
    inappropriately.
    
    Signed-off-by: Paul Barker <paul at betafive.co.uk>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../cdrtools/cdrtools-native_3.01.bb               |  5 +++-
 .../0001-Don-t-set-uid-gid-during-install.patch    | 27 ++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
index 78e1565..1c602e7 100644
--- a/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
+++ b/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
@@ -7,7 +7,10 @@ SECTION = "console/utils"
 LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2"
+SRC_URI = " \
+	${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2 \
+	file://0001-Don-t-set-uid-gid-during-install.patch \
+	"
 UPSTREAM_VERSION_UNKNOWN = "1"
 
 SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b"
diff --git a/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch b/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch
new file mode 100644
index 0000000..9d38294
--- /dev/null
+++ b/meta/recipes-devtools/cdrtools/cdrtools/0001-Don-t-set-uid-gid-during-install.patch
@@ -0,0 +1,27 @@
+From 529cd5b007aa681c3ca14e5ab1e30469dd51646b Mon Sep 17 00:00:00 2001
+From: Paul Barker <paul at betafive.co.uk>
+Date: Tue, 12 Nov 2019 22:17:19 +0000
+Subject: [PATCH] Don't set uid/gid during install
+
+Signed-off-by: Paul Barker <paul at betafive.co.uk>
+Upstream-Status: Inappropriate [native]
+---
+ RULES/rules.prg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/RULES/rules.prg b/RULES/rules.prg
+index 023555c..f70f1a7 100644
+--- a/RULES/rules.prg
++++ b/RULES/rules.prg
+@@ -94,7 +94,7 @@ INSGRP=		$(__DEFINSGRP:$(_UNIQ)%=%)
+ 
+ LD=		@echo "	==> LINKING   \"$@\""; ld
+ LOCALIZE=	@echo "	==> LOCALIZING \"$@\""; $(RM_F) $@; cp
+-INSTALL=	@echo "	==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS) -o $(INSUSR) -g $(INSGRP)
++INSTALL=	@echo "	==> INSTALLING \"$@\""; sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS)
+ CHMOD=		@echo "	==> SETTING PERMISSIONS ON \"$@\""; chmod
+ CHOWN=		@echo "	==> SETTING OWNER ON \"$@\""; chown
+ CHGRP=		@echo "	==> SETTING GROUP ON \"$@\""; chgrp
+-- 
+2.24.0
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list