All of lore.kernel.org
 help / color / mirror / Atom feed
* [krogoth] [PATCH] useradd_base: avoid unintended expansion for useradd parameters
@ 2016-08-25  9:18 Maxin B. John
  0 siblings, 0 replies; only message in thread
From: Maxin B. John @ 2016-08-25  9:18 UTC (permalink / raw)
  To: Armin Kuster

Hi,

>Date: Tue, 16 Aug 2016 14:12:03 +0300
>From: "Maxin B. John" <maxin.john@intel.com>
>To: openembedded-core@lists.openembedded.org
>CC: Niko Mauno <niko.mauno@vaisala.com>
>Subject: [OE-core] [PATCH] useradd_base: avoid unintended expansion for useradd parameters
>X-Mailer: git-send-email 2.4.0
>
>Now, useradd dollar sign requires three prepending backslash characters to
>avoid unintended expansion. It used to be just one prepending backslash
>character before Krogoth. Restore that behaviour.
>
>[YOCTO #10062]
>
>Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
>Signed-off-by: Maxin B. John <maxin.john@intel.com>
>---
> meta/classes/useradd_base.bbclass | 2 --
> 1 file changed, 2 deletions(-)
>
>diff --git a/meta/classes/useradd_base.bbclass b/meta/classes/useradd_base.bbclass
>index 0d81acc..f4dc713 100644
>--- a/meta/classes/useradd_base.bbclass
>+++ b/meta/classes/useradd_base.bbclass
>@@ -17,7 +17,6 @@ perform_groupadd () {
> 	local groupname=`echo "$opts" | awk '{ print $NF }'`
> 	local group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
> 	if test "x$group_exists" = "x"; then
>-		opts=`echo $opts | sed s/\'/\"/g`
> 		eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupadd \$opts\" || true
> 		group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
> 		if test "x$group_exists" = "x"; then
>@@ -35,7 +34,6 @@ perform_useradd () {
> 	local username=`echo "$opts" | awk '{ print $NF }'`
> 	local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
> 	if test "x$user_exists" = "x"; then
>-		opts=`echo $opts | sed s/\'/\"/g`
> 		eval flock -x $rootdir${sysconfdir} -c  \"$PSEUDO useradd \$opts\" || true
> 		user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
> 		if test "x$user_exists" = "x"; then
>-- 
>2.4.0

This is applicable to krogoth as well. Is it possible to cherry-pick this fix from
master branch ?

Best Regards,
Maxin


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-25  9:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-25  9:18 [krogoth] [PATCH] useradd_base: avoid unintended expansion for useradd parameters Maxin B. John

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.