Checking /proc/mounts from kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I want to check /proc/mounts from kernel, for
I want to forbid mounting on a directory which
itself or its subdirectories are already mounted.
For example, if /var/log is mounted, don't allow
mounting on /var or /var/log .

To do this I want to get dentries and vfsmounts
listed in /proc/mounts, but I don't know how to get them.
Using seq_operations mounts_op in fs/namespace.c
may be an answer, but I think I needn't to call d_path()
in show_vfsmnt() for my purpose.

I'm planning to perform this checking at
http://lxr.linux.no/source/fs/namespace.c?v=2.4.26#L734 .

Best Regards.
--
  Tetsuo Handa

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux