Messages in this thread Patch in this message | | | Subject | Re: kmod and 104 | Date | Sat, 06 Jun 1998 19:36:40 +0100 | From | David Woodhouse <> |
| |
shaw@shawc.demon.co.uk said: > On Sat, 6 Jun 1998, Andrea Arcangeli wrote: > > kmod: failed to exec /sbin/modprobe -s -k char-major-14, errno = 1 > > Can't open /dev/dsp! > > > > If I run the same command as root all works as usual.
> Looks like fsuid handling changed in 104, because of capabilities diffs.
<workaround patch omitted>
> But presumably the kmod code should really be changed to handle the > capabilities.
Something like this, presumably...
--- 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",
---- ---- ---- David Woodhouse, Robinson College, CB3 9AN, England. (+44) 0976 658355 Dave@imladris.demon.co.uk http://www.imladris.demon.co.uk finger pgp@dwmw2.robinson.cam.ac.uk for PGP key.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |