The gzexe shell script, which is used to create self-extracting compressed executables, does not detect its own dependency on /bin/sh, and will attempt to compress it if asked. It does however detect dependency on chmod, rm, sleep etc. and refuses to compress them. If you attempt to compress /bin/* to conserve space on a system with a small disk (in my case, a printer server with a 120 MB disk), gzexe will trash sh, which makes it impossible to uncom- press and use any other compressed binary (e.g. cp, in order to 'cp sh~ sh') It is also possible that the same problem exists for echo and sed (which are used by the decompression script, but not checked for by gzexe) Fix: Run this shell script as root: #!/bin/sh patch -n `which gzexe` - <<EOF 77c77 < gzip | tail | chmod | ln | sleep | rm) --- > sh | gzip | tail | chmod | ln | sleep | rm) EOF This will cause gzexe to check if you are trying to compress sh. How-To-Repeat: # gzexe /bin/sh Segmentation fault - core dumped
State Changed From-To: open->closed Suggested fix applied, thanks! src/gnu/usr.bin/gzip/gzexe rev 1.5