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

[Git][lintian/lintian][master] recursive-privilege-change: do not trigger with -maxdepth 1



Title: GitLab

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:

Changes:

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


  • Reply to: