Subject: Re: How to recover a messed up userland?
To: None <tech-userlevel@NetBSD.org>
From: Christopher W. Richardson <cwr@nexthop.com>
List: tech-userlevel
Date: 06/06/2004 10:59:01
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Manuel Bouyer <bouyer@antioche.eu.org> writes:

> I guess it is running

> lorder compat_exec.o compat_util.o kern_exit_43.o
> kern_info_43.o ... | tsort -q
> 
> You can try running this from command line, and see if you get the
> 7118: not found
> If so, you can try to find which command (tsort or lorder) is
> printing it.
> Note that lorder calls nm(1), so the message can be from nm too.

How completely weird.  After some judicious echo placing, it
turned out to be the last two sort(1) commands in the lorder
script.  The weirdness is

cwr@achilles$which sort
/home/cwr/sort
cwr@achilles$file /home/cwr/sort
/home/cwr/sort: ASCII text
cwr@achilles$ll /home/cwr/sort
- -rw-------  1 cwr  we  145 Apr 14 18:02 /home/cwr/sort
cwr@achilles$

No idea why it thinks that's executable.  Not only is it a plain
text file that isn't marked as executable; it doesn't even
contain a #! semantic in it.

I'll go back and rebuild everything after removing that file, and
see if it helps, but, now I'm worried about what crazy security
violation is going on that is letting the system try to "run"
text files.  Blargh.

As always, thanks for the assistance,

Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (NetBSD)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>

iD8DBQFAwzEyP65RBOOHTzERAnKBAKDQFI8HA2MKgOg7Z5HCmQWs3LGEnQCfXkt/
mhRwWM32+GaHJX1zm3Ms8oY=
=AjnN
-----END PGP SIGNATURE-----