[Gllug] Stupid shell question
Vincent AE Scott
gllug at codex.net
Thu Jun 20 15:06:00 UTC 2002
John HEARNS(John.Hearns at cern.ch)@Thu, Jun 20, 2002 at 02:30:25PM +0200:
> 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.
mmm, IIRC dean or smithy put me on to it.
>
> 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.
damn. :( hadnt thought about that much, but it make sense to pick up
errors before you try and fork/exec.
still it must do some checking which does involve system calls, maybe
its doing a stat() first? That would be the next thing to look at, and
see if you trap those instead.
-v
--
keys: http://codex.net/pgp/gpg.asc http://codex.net/pgp/pgp.asc
If NT is the answer, you didn't understand the question.
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list