[php-maint] Bug#770105: sed in wheezy doesn't have -z option

Aaron Schrab aaron at schrab.com
Wed Nov 19 00:18:46 UTC 2014

On Wed, 19 Nov 2014 00:21:19 +0100 Piotr Ożarowski <piotr at debian.org> wrote:
> sed in wheezy (v4.2.1) doesn't have -z (AKA --null-data).
> removing this option and -0 from xargs call in
> /usr/lib/php5/sessionclean fixed this for me, but I'm not sure if it's
> the proper fix (can php5 session file names contain special 
> characters?)

Besides those changes, I you'd also need to change `-F0` argument for 
lsof to just `-F`.  This would have problems if there are filenames 
which contain newlines, but I suspect that wouldn't happen.

Even with the above it just echoes the touch command rather than 
actually running it, so the `echo` needs to be removed as well.  This 
wouldn't be noticed if the lsof command isn't modified, since sed will 
fail to match anything leaving nothing for xargs to do.

A better option may be just backing out the change that introduced this, 
it definitely doesn't look like it was tested enough to have been 
introduced in a security update.

More information about the pkg-php-maint mailing list