Tinny Patch - 4

Marcin Dalecki (dalecki@sub994.sub.uni-goettingen.de)
Thu, 25 Sep 1997 12:39:54 +0200 (MET DST)


The following tinny patch fixes a little ommission from the implementation
of the sys_query_module function. As a nice sideeffect it will make the
live for some cracers little harder :-)

The patch is against an vanilla linux-2.1.56 kernel. Please apply it to
the next kernel revision.

Many thank's in advance!

===============START OF PATCH ============================================
diff -ur linux-2.1.56/kernel/module.c linux/kernel/module.c
--- linux-2.1.56/kernel/module.c Sat Sep 6 19:10:48 1997
+++ linux/kernel/module.c Wed Sep 24 21:34:33 1997
@@ -626,9 +626,12 @@
size_t *ret)
{
struct module *mod;
- int err;
+ int err = -EPERM;

lock_kernel();
+ if (!suser())
+ goto out;
+
if (name_user == NULL)
mod = &kernel_module;
else {
================END OF PATCH==============================================

Marcin