Re: [PATCH 2.6.9] fork: add a hook in do_fork()

From: Guillaume Thouvenin
Date: Tue Nov 23 2004 - 03:58:10 EST


On Tue, 2004-11-23 at 00:06 -0800, Greg KH wrote:
> On Tue, Nov 23, 2004 at 07:03:17AM +0100, Guillaume Thouvenin wrote:
> >
> > I don't know if this solution is good but it's easy to implement and
> > it just does the trick. I made some tests and it doesn't impact the
> > performance of the Linux kernel.
>
> What's wrong with the LSM hook already available for you to use for this
> function?
>
> thanks,

In fact I don't see how to use LSM hook to get information like PID of
the parent and the child. As far as I understand LSM hook, I can
register my own pointer to security_operations and like this, I can add
an hook in fork through the security_task_create() right? So my function
will be called each time a new process will be created but the only
parameter passed to the function is the clone_flags.

Is it possible to get the parent PID and the child PID which are
involved when the fork occurred?

Thank you very much for your help,
Guillaume

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/