[PATCH] Add MODULE_ALIAS_MISCDEV()

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] Add MODULE_ALIAS_MISCDEV()

Takashi Iwai
Hi,

the following patch adds MODULE_ALIAS_MISCDEV() definition for fuse
driver.  It will enable the auto-loading of the module via access to
the corresponding device file.

Appilcable to both 2.2.1 and 2.3-rc1.


Takashi

--- kernel/inode.c-dist 2005-05-24 20:38:09.000000000 +0200
+++ kernel/inode.c 2005-05-24 20:37:49.000000000 +0200
@@ -18,6 +18,7 @@
 #ifdef KERNEL_2_6
 #include <linux/parser.h>
 #include <linux/statfs.h>
+#include <linux/miscdevice.h>
 #else
 #include "compat/parser.h"
 #endif
@@ -27,6 +28,9 @@ MODULE_DESCRIPTION("Filesystem in Usersp
 #ifdef MODULE_LICENSE
 MODULE_LICENSE("GPL");
 #endif
+#ifdef MODULE_ALIAS_MISCDEV
+MODULE_ALIAS_MISCDEV(FUSE_MINOR);
+#endif
 
 spinlock_t fuse_lock;
 static kmem_cache_t *fuse_inode_cachep;


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Add MODULE_ALIAS_MISCDEV()

Miklos Szeredi
> the following patch adds MODULE_ALIAS_MISCDEV() definition for fuse
> driver.  It will enable the auto-loading of the module via access to
> the corresponding device file.
>
> Appilcable to both 2.2.1 and 2.3-rc1.

Thanks.

Applying this will have to go together with a cleanup of the device
access checking in fusermount.  

Currently not autoloading the fuse module is a half-hearted security
measure, perventing the use of FUSE without the sysadmin's explicit
action (modprobing fuse, or adding fuse to /etc/modules).

However it's clearly better if this is solved with permissions on
/dev/fuse (which would prevent autoloading in case the users lacks
permission).

Miklos


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Add MODULE_ALIAS_MISCDEV()

Takashi Iwai
At Wed, 25 May 2005 14:58:21 +0200,
Miklos Szeredi wrote:

>
> > the following patch adds MODULE_ALIAS_MISCDEV() definition for fuse
> > driver.  It will enable the auto-loading of the module via access to
> > the corresponding device file.
> >
> > Appilcable to both 2.2.1 and 2.3-rc1.
>
> Thanks.
>
> Applying this will have to go together with a cleanup of the device
> access checking in fusermount.  
>
> Currently not autoloading the fuse module is a half-hearted security
> measure, perventing the use of FUSE without the sysadmin's explicit
> action (modprobing fuse, or adding fuse to /etc/modules).
>
> However it's clearly better if this is solved with permissions on
> /dev/fuse (which would prevent autoloading in case the users lacks
> permission).

Agreed.  I thought of the possible complain, too, but IMO, the
existince of the driver and the security issue should be handled
separetly.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
fuse-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fuse-devel
Loading...