Louis-Philippe Véronneau pushed to branch master at lintian / lintian


Commits:
a4a5bb93 by Marc Leeman at 2025-10-03T10:37:53+02:00
recursive-privilege-change: do not trigger with -maxdepth 1

maintainer-script-bad-command run a number of tests on the debian
scripts. One of tests is to detect a recursive chmod/chown.

It also checks these in combination with find, but it fails to take into
account if find is used with `-maxdepth 1`. This remedies it and will
still trigger if `-maxdepth N` is used with N > 1

- - - - -


1 changed file:

- data/scripts/maintainer-script-bad-command


Changes:

=====================================
data/scripts/maintainer-script-bad-command
=====================================
@@ -37,7 +37,7 @@ maintainer-script-should-not-use-dpkg-maintscript-helper      
  ~~ 1 ~~ 1 ~~
 maintainer-script-updates-fontconfig-cache-improperly           ~~ 0 ~~ 0 
~~^(fontconfig)$      ~~          
~~${LEADING_PATTERN}(?:/usr/bin/)?fc-cache(?:\s|\Z)
 maintainer-script-calls-gconftool                               ~~ 1 ~~ 0 
~~^(gconf\d)$         ~~          ~~(?:/usr/bin/)?gconftool(?:-\d)?(?:\s|\Z)
 maintainer-script-calls-install-sgmlcatalog                     ~~ 1 ~~ 0 ~~   
                 ~~          ~~\binstall-sgmlcatalog\b
-recursive-privilege-change                                      ~~ 1 ~~ 0 ~~   
                 ~~          
~~\b(?:(?:chmod|chown).*(?:-R|--recursive)|find.*exec.*(?:chmod|chown))\b
+recursive-privilege-change                                      ~~ 1 ~~ 0 ~~   
                 ~~          
~~\b(?:(?:chmod|chown).*(?:-R|--recursive)|find(?:(?!-maxdepth[[:space:]]+1).)*exec.*(?:chmod|chown))\b
 maintainer-script-should-not-use-piuparts-variable              ~~ 0 ~~ 0 ~~   
                 ~~          
~~(PIUPARTS_(?:TEST|OBJECTS|PHASE|DISTRIBUTION(?:_PREV|_NEXT)?))\b
 maintainer-script-calls-service                                 ~~ 1 ~~ 0 ~~   
                 ~~          ~~${LEADING_PATTERN}service\b
 maintainer-script-calls-start-stop-daemon                       ~~ 0 ~~ 0 ~~   
                 ~~          ~~\bstart-stop-daemon(?=\s)(?!.*\s--stop\b)



View it on GitLab: 
https://salsa.debian.org/lintian/lintian/-/commit/a4a5bb93631b77638b27dbc2e735e9480fd1a451

-- 
View it on GitLab: 
https://salsa.debian.org/lintian/lintian/-/commit/a4a5bb93631b77638b27dbc2e735e9480fd1a451
You're receiving this email because of your account on salsa.debian.org.


Reply via email to