lkml.org 
[lkml]   [1998]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: kmod and 104
Date
From

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

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.027 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site