mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[PATCH] uml: restore hppfs support
Some time ago a trivial patch broke HPPFS (one var became a pointer, not all uses were updated). It wasn't fixed at that time because not very used, now it's been requested so I've fixed this, and it has been tested positively (at least partially). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
9786a8f3cb
commit
3f580470ba
2 changed files with 7 additions and 6 deletions
|
@ -128,7 +128,6 @@ config HOSTFS
|
||||||
|
|
||||||
config HPPFS
|
config HPPFS
|
||||||
tristate "HoneyPot ProcFS (EXPERIMENTAL)"
|
tristate "HoneyPot ProcFS (EXPERIMENTAL)"
|
||||||
depends on BROKEN
|
|
||||||
help
|
help
|
||||||
hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc
|
hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc
|
||||||
entries to be overridden, removed, or fabricated from the host.
|
entries to be overridden, removed, or fabricated from the host.
|
||||||
|
@ -141,8 +140,9 @@ config HPPFS
|
||||||
You only need this if you are setting up a UML honeypot. Otherwise,
|
You only need this if you are setting up a UML honeypot. Otherwise,
|
||||||
it is safe to say 'N' here.
|
it is safe to say 'N' here.
|
||||||
|
|
||||||
If you are actively using it, please ask for it to be fixed. In this
|
If you are actively using it, please report any problems, since it's
|
||||||
moment, it does not work on 2.6 (it works somehow on 2.4).
|
getting fixed. In this moment, it is experimental on 2.6 (it works on
|
||||||
|
2.4).
|
||||||
|
|
||||||
config MCONSOLE
|
config MCONSOLE
|
||||||
bool "Management console"
|
bool "Management console"
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
|
#include <linux/file.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
@ -491,7 +492,7 @@ static int hppfs_open(struct inode *inode, struct file *file)
|
||||||
fd = open_host_sock(host_file, &filter);
|
fd = open_host_sock(host_file, &filter);
|
||||||
if(fd > 0){
|
if(fd > 0){
|
||||||
data->contents = hppfs_get_data(fd, filter,
|
data->contents = hppfs_get_data(fd, filter,
|
||||||
&data->proc_file,
|
data->proc_file,
|
||||||
file, &data->len);
|
file, &data->len);
|
||||||
if(!IS_ERR(data->contents))
|
if(!IS_ERR(data->contents))
|
||||||
data->host_fd = fd;
|
data->host_fd = fd;
|
||||||
|
@ -543,7 +544,7 @@ static int hppfs_dir_open(struct inode *inode, struct file *file)
|
||||||
static loff_t hppfs_llseek(struct file *file, loff_t off, int where)
|
static loff_t hppfs_llseek(struct file *file, loff_t off, int where)
|
||||||
{
|
{
|
||||||
struct hppfs_private *data = file->private_data;
|
struct hppfs_private *data = file->private_data;
|
||||||
struct file *proc_file = &data->proc_file;
|
struct file *proc_file = data->proc_file;
|
||||||
loff_t (*llseek)(struct file *, loff_t, int);
|
loff_t (*llseek)(struct file *, loff_t, int);
|
||||||
loff_t ret;
|
loff_t ret;
|
||||||
|
|
||||||
|
@ -586,7 +587,7 @@ static int hppfs_filldir(void *d, const char *name, int size,
|
||||||
static int hppfs_readdir(struct file *file, void *ent, filldir_t filldir)
|
static int hppfs_readdir(struct file *file, void *ent, filldir_t filldir)
|
||||||
{
|
{
|
||||||
struct hppfs_private *data = file->private_data;
|
struct hppfs_private *data = file->private_data;
|
||||||
struct file *proc_file = &data->proc_file;
|
struct file *proc_file = data->proc_file;
|
||||||
int (*readdir)(struct file *, void *, filldir_t);
|
int (*readdir)(struct file *, void *, filldir_t);
|
||||||
struct hppfs_dirent dirent = ((struct hppfs_dirent)
|
struct hppfs_dirent dirent = ((struct hppfs_dirent)
|
||||||
{ .vfs_dirent = ent,
|
{ .vfs_dirent = ent,
|
||||||
|
|
Loading…
Reference in a new issue