how to get proc_root

Submitted by Anonymous
on August 28, 2009 - 10:57am

Hi, i am trying to hook readdir call in proc filesystem.

        struct file_operations *fops;

	fops = proc_root.proc_fops;
	readdir_old = fops->readdir;
	fops->readdir = readdir_new;

       

But, proc_root is no longer exported. So, how can I get it?
(No System.map, /dev/kmem ...)

Thank you

Sorry, I got it :) filp_open

Anonymous (not verified)
on
August 28, 2009 - 11:37am

Sorry, I got it :) filp_open function.

hooking readdir?

on
August 28, 2009 - 3:21pm

why do you hook readdir? you can easily create new proc entries.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.