[Libosinfo] [osinfo-db] install-script: Use single quotes around passwords set from a shell
Fabiano Fidêncio
fabiano at fidencio.org
Wed Apr 19 10:49:53 UTC 2017
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 at gmail.com>
Signed-off-by: Fabiano Fidêncio <fabiano at fidencio.org>
---
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 > 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
More information about the Libosinfo
mailing list