Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 457868 - sys-fs/eudev (maybe) with kernel 2.6.32 - wrong permissions on /dev/null
Summary: sys-fs/eudev (maybe) with kernel 2.6.32 - wrong permissions on /dev/null
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: eudev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-16 18:55 UTC by Vladimir Pavljuchenkov (SpiderX)
Modified: 2013-02-20 13:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
udev rule (50-fix-permission.rules,401 bytes, text/plain)
2013-02-16 18:56 UTC, Vladimir Pavljuchenkov (SpiderX)
Details
simple patch for udev (udev.patch,419 bytes, patch)
2013-02-16 18:57 UTC, Vladimir Pavljuchenkov (SpiderX)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Pavljuchenkov (SpiderX) 2013-02-16 18:55:18 UTC
There are old kernels (2.6.32-x) with DEVTMPFS support, but without support right permissions assignment for /dev/null, /dev/zero, etc. When devtmpfs created /dev/null, /dev/zero, it made them inaccessible to unprivileged accounts.
In the same time udev doesn't take care anymore of /dev/{null,zero...} permissions since that commit (http://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=378f2e074e38490103f999173bf717a5394170f8).

Since Gentoo is not going to prevent using udev with older kernels than 2.6.39, I think this will be right to include such udev rule (taken from https://bbs.archlinux.org/viewtopic.php?id=142816):

> SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"

into udev ebuild, and install it for old kernels:

> kernel_is eq 2 6 32 && doins "${FILESDIR}"/50-fix-permission.rules

Reproducible: Always
Comment 1 Vladimir Pavljuchenkov (SpiderX) 2013-02-16 18:56:06 UTC
Created attachment 339092 [details]
udev rule
Comment 2 Vladimir Pavljuchenkov (SpiderX) 2013-02-16 18:57:04 UTC
Created attachment 339094 [details, diff]
simple patch for udev
Comment 3 Mike Gilbert gentoo-dev 2013-02-17 18:16:49 UTC
It looks like it would be safe to install that rule unconditionally.
Comment 4 Vladimir Pavljuchenkov (SpiderX) 2013-02-17 18:59:32 UTC
> It looks like it would be safe to install that rule unconditionally.

Yes, it can be done in such way too. 
It will do the trick for old kernels, and will be harmless for modern ones, since correct permissions will be just reassigned by udev.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2013-02-17 19:12:23 UTC
added to udev-197-r9 (i'll revbump later) and 9999
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2013-02-17 19:13:15 UTC
in fact, move to eudev maintainers since it makes sense to keep 40-gentoo.rules in sync
Comment 7 Anthony Basile gentoo-dev 2013-02-20 13:38:15 UTC
(In reply to comment #6)
> in fact, move to eudev maintainers since it makes sense to keep
> 40-gentoo.rules in sync

Thanks Samuli, we're in sync.