compress utilities

Robert Connolly robert at
Thu Sep 7 19:19:01 PDT 2006

From 'man 1 gzexe':
The compressed executable is a shell  script. This may create some security
holes. In particular, the compressed executable relies on the PATH environment
variable to find gzip and some other utilities (tail, chmod, ln, sleep).

This doesn't seem to be a caveat anymore. All the programs in the compressed 
executable script have an explicit path.

And, from 'man 1 gzexe':
gzexe attempts to retain the original file attributes on the compressed  
executable,  but  you  may  have to fix them manually in some cases, using 
chmod or chown.

The vanilla GNU gzexe script seems to not change permissions.


permissions are reset with 'chmod u+x'

The BUGS doesn't mention the temp race vulnerability fixed by the Owl 
hardened-tmp patch, and obsd's gzexe.

Attached is a patch to obsd's gzexe to make it work with Linux (also 
substitute /usr/bin/mktemp with /bin/mktemp with recent hlfs), because we put 
gzip in /bin, and Linux's stat(1) uses a different switch for the format 
option. The patch also fixes a posix bug with tail(1) which also exists in 
the GNU version, and is being reported to LFS trac.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gzexe.diff
Type: text/x-diff
Size: 1149 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the hlfs-dev mailing list