diff --git a/CheckPolkitPrivs.py b/CheckPolkitPrivs.py index 9097c96..da0c1bc 100644 --- a/CheckPolkitPrivs.py +++ b/CheckPolkitPrivs.py @@ -21,12 +21,12 @@ class PolkitCheck(AbstractCheck.AbstractCheck): AbstractCheck.AbstractCheck.__init__(self, "CheckPolkitPrivs") self.privs = {} - for file in POLKIT_PRIVS_FILES: - if os.path.exists(file): - self._parsefile(file) + for filename in POLKIT_PRIVS_FILES: + if os.path.exists(filename): + self._parsefile(filename) - def _parsefile(self,file): - for line in open(file): + def _parsefile(self,filename): + for line in file(filename): line = line.split('#')[0].split('\n')[0] if len(line): line = re.split(r'\s+', line) @@ -54,12 +54,15 @@ class PolkitCheck(AbstractCheck.AbstractCheck): if not bn in POLKIT_PRIVS_WHITELIST: printError(pkg, "polkit-unauthorized-file", f) - bn = bn.split('.')[0] + if bn.endswith(".restrictive") or bn.endswith(".standard") or bn.endswith(".relaxed"): + bn = bn.split('.')[0] + if not bn in permfiles: permfiles[bn] = 1 for f in permfiles: f = pkg.dirName() + "/etc/polkit-default-privs.d/" + f + if os.path.exists(f+".restrictive"): self._parsefile(f + ".restrictive") elif os.path.exists(f+".standard"): @@ -69,6 +72,7 @@ class PolkitCheck(AbstractCheck.AbstractCheck): else: self._parsefile(f) + for f in files: if f in pkg.ghostFiles(): continue diff --git a/rpmlint.changes b/rpmlint.changes index d4b020d..d8162a9 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 19 18:36:04 CEST 2011 - dmueller@suse.de + +- fix stripping of unknown polkit suffixes (bnc#711485) + ------------------------------------------------------------------- Fri Aug 12 18:07:43 CEST 2011 - dmueller@suse.de