[elbe-devel] [PATCH 07/10] finetuning adduser: add proper Quotation marks around parameters

Torben Hohn torben.hohn at linutronix.de
Wed Mar 22 17:44:14 CET 2017


---
 elbepack/finetuning.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
index c81d327..83a9e41 100644
--- a/elbepack/finetuning.py
+++ b/elbepack/finetuning.py
@@ -225,12 +225,12 @@ class AddUserAction(FinetuningAction):
     def execute(self, log, buildenv, target):
       with target:
         if 'groups' in self.node.et.attrib:
-          log.chroot (target.path, "/usr/sbin/useradd -U -m -G %s -s %s %s" % (
+          log.chroot (target.path, '/usr/sbin/useradd -U -m -G "%s" -s "%s" "%s"' % (
                 self.node.et.attrib['groups'],
                 self.node.et.attrib['shell'],
                 self.node.et.text))
         else:
-          log.chroot (target.path, "/usr/sbin/useradd -U -m -s %s %s" % (
+          log.chroot (target.path, '/usr/sbin/useradd -U -m -s "%s" "%s"' % (
                 self.node.et.attrib['shell'], self.node.et.text))
 
         log.chroot( target.path,
-- 
2.1.4





More information about the elbe-devel mailing list