URL: https://github.com/SSSD/sssd/pull/440 Author: fidencio Title: #440: TOOLS: Double quote array expansions in sss_debuglevel Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/440/head:pr440 git checkout pr440
From b9abd5a293ae8c082884b206415775b4a994c03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <[email protected]> Date: Tue, 7 Nov 2017 09:09:55 +0100 Subject: [PATCH 1/2] TOOLS: Double quote array expansions in sss_debuglevel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise they're like $* and break on spaces. This issue has been caught by coverity: Defect type: SHELLCHECK_WARNING Signed-off-by: Fabiano Fidêncio <[email protected]> --- src/tools/wrappers/sss_debuglevel.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/wrappers/sss_debuglevel.in b/src/tools/wrappers/sss_debuglevel.in index 4deeafff6..aa19f790a 100644 --- a/src/tools/wrappers/sss_debuglevel.in +++ b/src/tools/wrappers/sss_debuglevel.in @@ -1,4 +1,4 @@ #!/bin/sh sbindir=@sbindir@ echo "Redirecting to $sbindir/sssctl debug-level" >&2 -$sbindir/sssctl debug-level $@ +$sbindir/sssctl debug-level "$@" From 133ec647cfcb68b335d777d6984cd1b01f518cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <[email protected]> Date: Wed, 8 Nov 2017 17:59:15 +0100 Subject: [PATCH 2/2] TOOLS: Call "exec" for sss_debuglevel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This suggestion came from Lukáš Slebodník. The advantage of calling "exec" is to avoid forking another child of the process. Signed-off-by: Fabiano Fidêncio <[email protected]> --- src/tools/wrappers/sss_debuglevel.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/wrappers/sss_debuglevel.in b/src/tools/wrappers/sss_debuglevel.in index aa19f790a..a55afcddc 100644 --- a/src/tools/wrappers/sss_debuglevel.in +++ b/src/tools/wrappers/sss_debuglevel.in @@ -1,4 +1,4 @@ #!/bin/sh sbindir=@sbindir@ echo "Redirecting to $sbindir/sssctl debug-level" >&2 -$sbindir/sssctl debug-level "$@" +exec $sbindir/sssctl debug-level "$@"
_______________________________________________ sssd-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
