SHA256
1
0
forked from pool/rpmlint
rpmlint/ignore-non-readable-in-etc.diff

13 lines
807 B
Diff
Raw Normal View History

--- FilesCheck.py
+++ FilesCheck.py
@@ -948,7 +948,8 @@
printWarning(pkg, 'non-executable-in-bin', f, oct(perm))
if not devel_pkg and (includefile_regex.search(f) or buildconfigfile_regex.search(f)) and not is_doc:
printWarning(pkg, 'devel-file-in-non-devel-package', f)
- if mode & 0444 != 0444 and perm & 07000 == 0 and f[0:len('/var/log')] != '/var/log':
+ if mode & 0444 != 0444 and perm & 07000 == 0 and \
+ not f.startswith('/var/log/') and not f.startswith('/etc/'):
printError(pkg, 'non-readable', f, oct(perm))
if size == 0 and not normal_zero_length_regex.search(f) and f not in ghost_files:
printError(pkg, 'zero-length', f)