Re: 2.1.104 kmod/sound problem, 2.1.104pre1 was fine.

Derrik (dpates@kalifornia.com)
Sun, 7 Jun 1998 07:46:41 -0700 (PDT)


On Sun, 7 Jun 1998, Tigran Aivazian wrote:

> Hello guys,
>
> In 2.1.104 proper I can't get kmod to autoload char-major-14 I get
> a message from kmod saying that it fails to execute
> "/sbin/modprobe -s -k char-major-14" and when I try the command manually I
> get EPERM and truss (alias truss=strace, of course) reveals that EPERM is
> coming from delete_module(). In /var/log/messages I get create_module():
> opl3.o: Operation not permitted and similar for sound.o.

Yes, this was solved. I got this also, but David Woodhouse posted a patch.
It apparently was due to a modification in the capabilities code. I'm
attaching the patch so you don't have to search for it in the sea of
linux-kernel postings. :)

Derrik Pates
dpates@kalifornia.com
dpates@acm.org

--- linux/kernel/kmod.c.orig Sat Jun 6 17:49:35 1998
+++ linux/kernel/kmod.c Sat Jun 6 18:32:20 1998
@@ -66,8 +66,12 @@
if (current->files->fd[i]) close(i);
}

- set_fs(KERNEL_DS); /* Allow execve args to be in kernel space. */
current->uid = current->euid = current->fsuid = 0;
+ cap_set_full(current->cap_inheritable);
+ cap_set_full(current->cap_effective);
+
+ set_fs(KERNEL_DS); /* Allow execve args to be in kernel space. */
+
if (execve(modprobe_path, argv, envp) < 0) {
printk(KERN_ERR
"kmod: failed to exec %s -s -k %s, errno = %d\n",

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu