[Gllug] Stupid shell question
John HEARNS
John.Hearns at cern.ch
Thu Jun 20 12:30:25 UTC 2002
On Thu, 20 Jun 2002, Vincent AE Scott wrote:
> John Hearns(John.Hearns at cern.ch)@Wed, Jun 19, 2002 at 12:43:27PM +0200:
> I think LIDS would allow you to achieve this, but it'd probably be far
> easier to just use SNARE instead. As it has far less configuration to
> make it work, and IIRC doesnt require a reboot.
>
Vince, you are still a star, and Snare still looks good.
Sadly though it doesn't trap 'command not found'
Reason is that Snare traps things in the kernel.
Longer explanation for any newbies on the list:
Command not found happens in the shell.
In bash, have a look at execute_command.c
When you type a command, bash executes the function
search_for_command (this is in findcmd.c)
If the command cannot be found, an error message is printed.
As no execve A kernel call is made, this is not trapped by Snare.
This is one of the fun things about Linux!
You can get right in there in the source code - and you can learn
by examining the C code, and seeing what it does.
Or you can alter things to make the system do new or unusual things.
(RPM system specific)
If you are a newbie and don't know this already, you can download
the Source RPM for a package like bash, instlal and unpack it.
Then you can have a look at the source.
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list