hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
 
[20080921] *foot = bullet, with gzip
Found via pkgsrc/editors/gedit:
# touch /tmp/foo
# env GZIP=`which gzip` gzip /tmp/foo
# ls -la /tmp/foo*
-rw-r--r--  1 root  wheel  24 Sep 19 22:47 /tmp/foo.gz
# ls -la /usr/bin/gzip
ls: /usr/bin/gzip: No such file or directory
# ls -la /usr/bin/gzip*
-rwxr-xr-x  1 root  wheel  15093 Sep 19 22:44 /usr/bin/gzip.gz 
This exists in both GNU gzip V1.3.12 and NetBSD's gzip V20060927. Apparently neither program checks if the GZIP environment variable contains a valid gzip option, and blindly passes its value on to the command line.

[Tags: ]


Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 24535442
Copyright (c) Hubert Feyrer