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?
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.
Created attachment 1044099 [details]
Backport patches to fix unshare on new kernels.
What about to update to f22? :-)
F22 uses util-linux 2.26.2, which already has the fix.
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.