mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
[PATCH] sanitize proc_sysctl
* keep references to ctl_table_head and ctl_table in /proc/sys inodes * grab the former during operations, use the latter for access to entry if that succeeds * have ->d_compare() check if table should be seen for one who does lookup; that allows us to avoid flipping inodes - if we have the same name resolve to different things, we'll just keep several dentries and ->d_compare() will reject the wrong ones. * have ->lookup() and ->readdir() scan the table of our inode first, then walk all ctl_table_header and scan ->attached_by for those that are attached to our directory. * implement ->getattr(). * get rid of insane amounts of tree-walking * get rid of the need to know dentry in ->permission() and of the contortions induced by that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
ae7edecc9b
commit
9043476f72
5 changed files with 219 additions and 236 deletions
|
@ -961,6 +961,7 @@ struct ctl_table_header;
|
|||
|
||||
extern void sysctl_head_get(struct ctl_table_header *);
|
||||
extern void sysctl_head_put(struct ctl_table_header *);
|
||||
extern int sysctl_is_seen(struct ctl_table_header *);
|
||||
extern struct ctl_table_header *sysctl_head_grab(struct ctl_table_header *);
|
||||
extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev);
|
||||
extern struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue