Codebase list debian-goodies / d1f3ccc
Handle programs setting $0 incorrectly E.g. like SpamAssassin's spamd, see https://bugzilla.redhat.com/show_bug.cgi?id=755644 Thanks Wolodja Wentland! Closes: #715000 Axel Beckert 10 years ago
2 changed file(s) with 16 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
537537 if not data[-1]: data.pop()
538538 # Strip first value, the interpreter
539539 data.pop(0)
540 # Strip all options following the interpreter, e.g. python's -O
541 m = re.match("^-", data[0])
542 while (m):
543 data.pop(0)
540 # Check if something's left after the interpreter, see #715000
541 if data:
542 # Strip all options following the interpreter, e.g. python's -O
544543 m = re.match("^-", data[0])
545 if data and data[0]: data = data[0]
546 data = self.which(data)
547 m = re.search(r'^(/usr/\S+)$', data)
548 if m:
549 # store the real full path of script as the program
550 self.program = m.group(1)
544 while (m):
545 data.pop(0)
546 m = re.match("^-", data[0])
547 if data and data[0]: data = data[0]
548 data = self.which(data)
549 m = re.search(r'^(/usr/\S+)$', data)
550 if m:
551 # store the real full path of script as the program
552 self.program = m.group(1)
551553 except OSError, e:
552554 if e.errno != errno.ENOENT:
553555 if self.pid == 1:
00 debian-goodies (0.63) UNRELEASED; urgency=low
11
2 * [checkrestart]:
3 - Handle programs setting $0 / argv[0] incorrectly (e.g. spamd, see
4 https://bugzilla.redhat.com/show_bug.cgi?id=755644; Closes: #715000)
5 Thanks Wolodja Wentland!
26 * Mention check-enhancements in the long description
37 * Add example to checkrestart's man page (LP: #280793)
48