PATH in maintainer scripts taken from env that calls dpkg
Christoph Anton Mitterer <[email protected]>
| Newsgroups | gmane.linux.debian.devel.dpkg.general |
|---|---|
| Message-ID | <[email protected]> |
Hey. Not sure whether this is a bug or intended behaviour,... but I've just noticed that is seems that when e.g. purging a package postrm will see the PATH as it was set in the env from which dpkg --pruge was invoked. I.e. there is no "sanitisation" to some static value like "/usr/sbin:/usr/bin:/sbin:/bin" or so. I guess for the maintainer scripts it should never make any sense to run them in a non-standard PATH, or should it? I haven't checked how the behaviour is for other env vars, e.g. whether things like POSIXLY_CORRECT or so are passed on. In principle, I guess, the env should be most cleaned (other than perhaps things like TERM) and only some standard env vars be set for whatever dpkg invokes? Cheers, Chris.