Patchwork [1/2,meta-networking] vsftpd: use quotes to wrap variable

login
register
mail settings
Submitter rongqing.li@windriver.com
Date Oct. 10, 2013, 8:34 a.m.
Message ID <1381394085-7681-1-git-send-email-rongqing.li@windriver.com>
Download mbox | patch
Permalink /patch/59589/
State Accepted, archived
Commit bcaa7aabf8088aadfdbda4da4a3f1c30af8dd9d6
Headers show

Comments

rongqing.li@windriver.com - Oct. 10, 2013, 8:34 a.m.
From: Roy Li <rongqing.li@windriver.com>

"test -z ${PAMLIB}" in do_install() may report error if ${PAMLIB}
has space chars. This commit added double quotes to wrap it in
case of errors.

Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Joe MacDonald - Oct. 18, 2013, 4:30 p.m.
Merged, thanks.
-J.

[[oe] [PATCH 1/2 meta-networking] vsftpd: use quotes to wrap variable] On 13.10.10 (Thu 16:34) rongqing.li@windriver.com wrote:

> From: Roy Li <rongqing.li@windriver.com>
> 
> "test -z ${PAMLIB}" in do_install() may report error if ${PAMLIB}
> has space chars. This commit added double quotes to wrap it in
> case of errors.
> 
> Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>  meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
> index 2c3e009..7677477 100644
> --- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
> +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
> @@ -60,7 +60,7 @@ do_install() {
>  
>      install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/
>      install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/
> -    if ! test -z ${PAMLIB} ; then
> +    if ! test -z "${PAMLIB}" ; then
>          install -d ${D}${sysconfdir}/pam.d/
>          cp ${S}/RedHat/vsftpd.pam ${D}${sysconfdir}/pam.d/vsftpd
>          sed -i "s:/lib/security:${base_libdir}/security:" ${D}${sysconfdir}/pam.d/vsftpd

Patch

diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
index 2c3e009..7677477 100644
--- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
+++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
@@ -60,7 +60,7 @@  do_install() {
 
     install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/
     install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/
-    if ! test -z ${PAMLIB} ; then
+    if ! test -z "${PAMLIB}" ; then
         install -d ${D}${sysconfdir}/pam.d/
         cp ${S}/RedHat/vsftpd.pam ${D}${sysconfdir}/pam.d/vsftpd
         sed -i "s:/lib/security:${base_libdir}/security:" ${D}${sysconfdir}/pam.d/vsftpd