[osinfo-db] install-script: Use single quotes around passwords set from a shell

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We have to have single quotes around the passwords set from a shell
otherwise a password like "foo$bar" would be interpreted by the shell as
"foo" value of $bar.

Reported-by: Rafael Fonseca <fonsecasantos.rafael@xxxxxxxxx>
Signed-off-by: Fabiano Fidêncio <fabiano@xxxxxxxxxxxx>
---
 data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in | 4 ++--
 data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in    | 2 +-
 data/install-script/redhat.com/rhel-kickstart-desktop.xml.in          | 4 ++--
 data/install-script/redhat.com/rhel-kickstart-jeos.xml.in             | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
index 6f53299..bdc9f5d 100644
--- a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
+++ b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
@@ -176,13 +176,13 @@ useradd -G wheel <xsl:value-of select="config/user-login"/> # Add user
 if test -z '<xsl:value-of select="config/user-password"/>'; then
     passwd -d <xsl:value-of select="config/user-login"/> # Make user account passwordless
 else
-    echo <xsl:value-of select="config/user-password"/> |passwd --stdin <xsl:value-of select="config/user-login"/>
+    echo '<xsl:value-of select="config/user-password"/>' |passwd --stdin <xsl:value-of select="config/user-login"/>
 fi
 
 if test -z '<xsl:value-of select="config/admin-password"/>'; then
     passwd -d root # Make root account passwordless
 else
-    echo <xsl:value-of select="config/admin-password"/> |passwd --stdin root
+    echo '<xsl:value-of select="config/admin-password"/>' |passwd --stdin root
 fi
 
 # Set user avatar
diff --git a/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in b/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in
index 8b99dfe..f4d95e0 100644
--- a/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in
+++ b/data/install-script/fedoraproject.org/fedora-kickstart-jeos.xml.in
@@ -108,7 +108,7 @@ mouse generic3ps/2 --device psaux
 </xsl:if>
 skipx
 network --bootproto dhcp
-rootpw <xsl:value-of select="config/admin-password"/>
+rootpw '<xsl:value-of select="config/admin-password"/>'
 firewall --disabled
 authconfig --enableshadow --enablemd5
 <xsl:if test="os/version &gt; 1">
diff --git a/data/install-script/redhat.com/rhel-kickstart-desktop.xml.in b/data/install-script/redhat.com/rhel-kickstart-desktop.xml.in
index d4a9005..388d6d7 100644
--- a/data/install-script/redhat.com/rhel-kickstart-desktop.xml.in
+++ b/data/install-script/redhat.com/rhel-kickstart-desktop.xml.in
@@ -119,13 +119,13 @@ useradd -G wheel <xsl:value-of select="config/user-login"/> # Add user
 if test -z '<xsl:value-of select="config/user-password"/>'; then
     passwd -d <xsl:value-of select="config/user-login"/> # Make user account passwordless
 else
-    echo <xsl:value-of select="config/user-password"/> |passwd --stdin <xsl:value-of select="config/user-login"/>
+    echo '<xsl:value-of select="config/user-password"/>' |passwd --stdin <xsl:value-of select="config/user-login"/>
 fi
 
 if test -z '<xsl:value-of select="config/admin-password"/>'; then
     passwd -d root # Make root account passwordless
 else
-    echo <xsl:value-of select="config/admin-password"/> |passwd --stdin root
+    echo '<xsl:value-of select="config/admin-password"/>' |passwd --stdin root
 fi
 
 # Set user avatar
diff --git a/data/install-script/redhat.com/rhel-kickstart-jeos.xml.in b/data/install-script/redhat.com/rhel-kickstart-jeos.xml.in
index db7ec7f..dfe9534 100644
--- a/data/install-script/redhat.com/rhel-kickstart-jeos.xml.in
+++ b/data/install-script/redhat.com/rhel-kickstart-jeos.xml.in
@@ -63,7 +63,7 @@ keyboard us
 lang <xsl:value-of select="config/l10n-language"/>
 skipx
 network --bootproto dhcp
-rootpw <xsl:value-of select="config/admin-password"/>
+rootpw '<xsl:value-of select="config/admin-password"/>'
 firewall --disabled
 authconfig --enableshadow --enablemd5
 selinux --enforcing
-- 
2.9.3

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux