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

[lintian] 01/01: Fix false positive for 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 2f54341243b45bede93e96f55807bf41cb4105a5
Author: Bastien ROUCARIÈS <roucaries.bastien@gmail.com>
Date:   Sat Jan 4 22:13:40 2014 +0100

    Fix false positive for maintainer-script-should-not-use-adduser-system-without-home
    
    Allow variable for --home parameter
---
 data/scripts/maintainer-script-bad-command                | 2 +-
 debian/changelog                                          | 3 +++
 t/tests/scripts-maintainer-general/debian/debian/postinst | 6 ++++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/data/scripts/maintainer-script-bad-command b/data/scripts/maintainer-script-bad-command
index d9af342..15ea402 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 2e69b77..96b2b09 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -69,6 +69,9 @@ lintian (2.5.21) UNRELEASED; urgency=medium
 
   * data/scripts/maintainer-script-bad-command:
     + [BR] Service is reserved to system admin (Closes: #656229).
+    + [BR] Fix false positive for
+      maintainer-script-should-not-use-adduser-system-without-home
+      by allowing shell variable (Closes:  #733595).
 
   * debian/control:
     + [NT] Add relevant relations on libyaml-perl, which is
diff --git a/t/tests/scripts-maintainer-general/debian/debian/postinst b/t/tests/scripts-maintainer-general/debian/debian/postinst
index e1b4abe..51f19c0 100755
--- a/t/tests/scripts-maintainer-general/debian/debian/postinst
+++ b/t/tests/scripts-maintainer-general/debian/debian/postinst
@@ -155,4 +155,10 @@ adduser --system bar --home /var/lib/bar
 # service
 service apache2 start
 
+# adduser through variable
+DEVNULL=/dev/null
+adduser --system bar1 --home $DEVNULL
+adduser --system bar2 --home ${DEVNULL}
+
+
 #DEBHELPER#

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


Reply to: