Bug 1184294 - Please fix unshare on new kernels
Summary: Please fix unshare on new kernels
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 21
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-01-21 00:51 UTC by Andy Lutomirski
Modified: 2015-08-13 08:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-08-13 08:44:20 UTC
Type: Bug

Attachments (Terms of Use)
Backport patches to fix unshare on new kernels. (11.01 KB, patch)
2015-06-28 19:29 UTC, Ting-Wei Lan
lantw44: review?
Details | Diff

Description Andy Lutomirski 2015-01-21 00:51:21 UTC
On recent kernels (3.18.2 and up, and possibly some kernels on the 3.17 branch), unshare -r no longer works when run as an unprivileged user.  It fails like this:

$ unshare -r
unshare: write failed /proc/self/gid_map: Operation not permitted

It's fixed by these two upstream commits:



Can you backport those two commits?


Comment 1 Ting-Wei Lan 2015-04-12 18:34:12 UTC
unshare works after applying two patches mentioned above.  5e43af7e345310f734cbfb5a0bd6ee040cf178a7 (with changes to files other than unshare.1 removed) is also needed to get unshare.1 patch successfully applied.

Comment 2 Ting-Wei Lan 2015-06-28 19:29:46 UTC
Created attachment 1044099 [details]
Backport patches to fix unshare on new kernels.

Comment 3 Karel Zak 2015-06-29 13:50:54 UTC
What about to update to f22? :-)

Comment 4 Ting-Wei Lan 2015-06-29 14:00:41 UTC
F22 uses util-linux 2.26.2, which already has the fix.

Comment 5 Ting-Wei Lan 2015-07-06 15:42:44 UTC
Will this problem be fixed? Or users needing this feature should upgrade to f22? I had a util-linux build with the same patches applied to fix the problem for f21, but I no longer maintain it because all of my systems has been upgraded to f22.


Note You need to log in before you can comment on or make changes to this bug.