Re: call insmod in C program



kartik saxena schrieb:
mbm wrote:

I need to insert kernel modules from a C application , is it possible
to do that without calling system("insmod ..")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hi, here goes the program.

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main()
{
setuid(0);
system("/sbin/insmod /.../yourmodule.ko");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hmmm.
.