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

[lintian] 01/01: Fix a false positive of maintainer-script-should-not-use-adduser-system-without-home



This is an automated email from the git hooks/post-receive script.

broucaries-guest pushed a commit to branch master
in repository lintian.

commit e2cacfb7088183e591e783bd47829859de5026bd
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date:   Wed Feb 19 17:42:27 2014 +0100

    Fix a false positive of maintainer-script-should-not-use-adduser-system-without-home
    
    * data/scripts/maintainer-script-bad-command:
    
    maintainer-script-should-not-use-adduser-system-without-home
    due to quoting, thanks to Andreas Beckmann <anbe@debian.org>
    (Closes: #739109).
    
    Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
 data/scripts/maintainer-script-bad-command                | 2 +-
 debian/changelog                                          | 5 +++++
 t/tests/scripts-maintainer-general/debian/debian/postinst | 5 +++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/data/scripts/maintainer-script-bad-command b/data/scripts/maintainer-script-bad-command
index 15ea402..cf9ecb1 100644
--- a/data/scripts/maintainer-script-bad-command
+++ b/data/scripts/maintainer-script-bad-command
@@ -29,7 +29,7 @@ maintainer-script-removes-device-files                          ~~ 0 ~~
 maintainer-script-should-not-hide-init-failure                  ~~ 0 ~~                    ~~          ~~invoke-rc.d.*\|\| \s+ exit \s+ 0
 maintainer-script-should-not-modify-ld-so-conf                  ~~ 0 ~~^libc               ~~          ~~(?:\A\s*(?:cp|mv)\s+.*\s+|>\s*)/etc/ld\.so\.conf\s*(?:\s|\Z)
 maintainer-script-should-not-modify-netbase-managed-file        ~~ 0 ~~                    ~~          ~~(?:\A\s*(?:cp|mv)\s+.*\s+|>\s*)(/etc/(?:services|protocols|rpc))\s*(?:\s|\Z)
-maintainer-script-should-not-use-adduser-system-without-home    ~~ 1 ~~                    ~~          ~~adduser\s+--system(?=\s)(?!.*\s--home\s+(?:/(?!home/)|\$[\(\[\{]?))
+maintainer-script-should-not-use-adduser-system-without-home    ~~ 1 ~~                    ~~          ~~adduser\s+--system(?=\s)(?!.*\s--home\s+(?:["']?/(?!home/)|"?\$[\(\[\{]?))
 maintainer-script-should-not-use-ancient-dpkg-epoch-check       ~~ 0 ~~                    ~~          ~~${LEADIN}dpkg\s+--assert-working-epoch\b
 maintainer-script-should-not-use-ancient-dpkg-multi-conrep-check~~ 0 ~~                    ~~          ~~${LEADIN}dpkg\s+--assert-multi-conrep\b
 maintainer-script-should-not-use-deprecated-chown-usage         ~~ 0 ~~                    ~~          ~~(chown(?:\s+--?[A-Za-z-]+)*\s+[-_A-Za-z0-9]+\.[-_A-Za-z0-9]+)\s+
diff --git a/debian/changelog b/debian/changelog
index cd2ecc0..d69bec0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,11 @@ lintian (2.5.22) UNRELEASED; urgency=medium
   * data/files/privacy*:
     + [BR] Improve detection of privacy-breach-google-cse, thanks to
       Paul Wise (Closes: #739247).
+  * data/scripts/maintainer-script-bad-command:
+    + [BR] Fix false positive
+      maintainer-script-should-not-use-adduser-system-without-home
+      due to quoting, thanks to Andreas Beckmann <anbe@debian.org>
+      (Closes: #739109).
 
   * debian/tests/control:
     + [NT] Use the new @builddeps@ from autopkgtest/2.5.5
diff --git a/t/tests/scripts-maintainer-general/debian/debian/postinst b/t/tests/scripts-maintainer-general/debian/debian/postinst
index 51f19c0..2be496a 100755
--- a/t/tests/scripts-maintainer-general/debian/debian/postinst
+++ b/t/tests/scripts-maintainer-general/debian/debian/postinst
@@ -160,5 +160,10 @@ DEVNULL=/dev/null
 adduser --system bar1 --home $DEVNULL
 adduser --system bar2 --home ${DEVNULL}
 
+# this is a false positive due to quoting
+adduser --system bar2 --home "${DEVNULL}"
+adduser --system --ingroup smmta --home "/var/lib/sendmail" \
+        --disabled-password \
+        --quiet --gecos 'Mail Transfer Agent' smmta;
 
 #DEBHELPER#

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: