2001-03-25 21:50:47

by James Stevenson

[permalink] [raw]
Subject: question on /dev/tap0


Hi

would somebody be able to explain to me
when you try to open /dev/tap0 which is a
character device file which has the permissions

File: "tap0"
Size: 0 Filetype: Character Device
Mode: (0666/crw-rw-rw-)

when tried to open

[mistral@linux /dev]$ cat tap0
cat: tap0: Operation not permitted

and strace shows that it gets a permission error
open("tap0", O_RDONLY|0x8000) = -1 EPERM

is it just me or is this either
a) a bug
b) very misleading

thanks
James

--
---------------------------------------------
Check Out: http://stev.org
E-Mail: [email protected]
10:50pm up 58 min, 3 users, load average: 0.30, 0.11, 0.03


2001-03-26 00:28:42

by Lennert Buytenhek

[permalink] [raw]
Subject: Re: question on /dev/tap0


Intended behaviour. This is because of the access checks done in the
netlink code. Misleading, yes.


On Sun, 25 Mar 2001, James Stevenson wrote:

>
> Hi
>
> would somebody be able to explain to me
> when you try to open /dev/tap0 which is a
> character device file which has the permissions
>
> File: "tap0"
> Size: 0 Filetype: Character Device
> Mode: (0666/crw-rw-rw-)
>
> when tried to open
>
> [mistral@linux /dev]$ cat tap0
> cat: tap0: Operation not permitted
>
> and strace shows that it gets a permission error
> open("tap0", O_RDONLY|0x8000) = -1 EPERM
>
> is it just me or is this either
> a) a bug
> b) very misleading
>
> thanks
> James
>
>


2001-03-26 09:53:52

by David Woodhouse

[permalink] [raw]
Subject: Re: question on /dev/tap0


[email protected] said:
> Intended behaviour. This is because of the access checks done in the
> netlink code. Misleading, yes.

I fixed the netlink code so it allowed this to work at one point. Search
l-k archives for it.

--
dwmw2