Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 1996 04:13:17 +0300 (EET DST)
From:      Heikki Suonsivu <hsu@clinet.fi>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/1328: install silently removes target if strip is unexecutable
Message-ID:  <199606170113.EAA20317@katiska.clinet.fi>
Resent-Message-ID: <199606170120.SAA03345@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1328
>Category:       bin
>Synopsis:       install silently removes target if strip is unexecutable
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 16 18:20:01 PDT 1996
>Last-Modified:
>Originator:     Heikki Suonsivu
>Organization:
Clinet, Espoo, Finland
>Release:        FreeBSD 2.2-CURRENT i386
>Environment:

	-current (probably applies to other versions?)

>Description:

	I had a panic when the system was compiling strip, and
unfortunately I did not notice that strip binary had become a 0-size
file with 644 modes.  After I retried make world, it said

install ... -s ...
strip: permission denied

for all programs and removed the targets!

Fortunately make stopped after removing things like echo and cp, when
it tried to ln -s something to something else, so with 10 minutes of
figuring out what was going on and manual installing I got the
binaries back where they belong.

>How-To-Repeat:

make strip 0-sized file with 644 permissions and do a make world
(probably just doing install is enough).

>Fix:

Files should not get removed if strip fails.

If install fails, it should return non-zero exit value so that make
will stop before serious damage gets done.

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606170113.EAA20317>