lkml.org 
[lkml]   [2000]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[FIX]: [BUG] 2.3.50 no longer allows regular user to bind unix-domain sockets


On 8 Mar 2000, Daniel Pittman wrote:

> Between 2.3.50-pre2 and 2.3.50 something changed that caused everything
> run as my regular user to fail when binding Unix-domain sockets.
>
> I suspect a change to `linux/fs/namei.c' is responsible, where it
> introduces (as far as I can tell) a new check for CAP_MKNOD before
> allowing the creation of Unix domain sockets.

Erm... The check is bogus, indeed. It used to sit in sys_mknod() (which is
almost never used to create sockets) and had been moved downwards, where
it actually ought to be. The only problem being that it ought to be there
in correct form... Fix:

--- fs/namei.c Tue Mar 7 23:14:35 2000
+++ fs/namei.c.new Tue Mar 7 23:15:20 2000
@@ -745,7 +745,7 @@

mode &= ~current->fs->umask;

- if (!S_ISFIFO(mode) && !capable(CAP_MKNOD))
+ if ((S_ISCHR(mode)||S_ISBLK(mode)) && !capable(CAP_MKNOD))
goto exit_lock;

error = may_create(dir, dentry);

Linus, apply it, please. Sorry about that... ;-<
Al


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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