Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 534014 - net-vpn/tor systemd service requires CAP_SYS_RESOURCE
Summary: net-vpn/tor systemd service requires CAP_SYS_RESOURCE
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: John Helmert III
URL:
Whiteboard:
Keywords:
: 542464 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-30 14:08 UTC by Chris Wells
Modified: 2023-01-29 05:21 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Wells 2014-12-30 14:08:20 UTC
Recent versions of Tor fail to start on my hardened gentoo with:

[warn] You appear to lack permissions to change memory limits. Are you root?
[warn] Unable to raise RLIMIT_MEMLOCK: Operation not permitted
[notice] Unable to lock all current and future memory pages: Cannot allocate memory

If I add CAP_SYS_RESOURCE to the CapabilityBoundingSet line, Tor starts fine.
Comment 1 Anthony Basile gentoo-dev 2015-03-07 18:59:41 UTC
(In reply to Chris Wells from comment #0)
> Recent versions of Tor fail to start on my hardened gentoo with:
> 
> [warn] You appear to lack permissions to change memory limits. Are you root?
> [warn] Unable to raise RLIMIT_MEMLOCK: Operation not permitted
> [notice] Unable to lock all current and future memory pages: Cannot allocate
> memory
> 
> If I add CAP_SYS_RESOURCE to the CapabilityBoundingSet line, Tor starts fine.

I don't understand systemd to be honest, so I don't know what to do here.

Can someone in the systemd team help me out?
Comment 2 Anthony Basile gentoo-dev 2015-03-07 23:53:41 UTC
*** Bug 542464 has been marked as a duplicate of this bug. ***
Comment 3 Anthony Basile gentoo-dev 2015-03-07 23:59:44 UTC
I think this might be fixed with 0.2.6.3 but I'm not sure.  Can you test.
Comment 4 Craig Andrews gentoo-dev 2016-07-27 02:54:25 UTC
I personally don't see this error, so either I don't know how to reproduce it or it has been fixed (I'm using net-misc/tor-0.2.8.5_rc).

If this problem still exists, it should probably be reported upstream at https://trac.torproject.org/ as well.
Comment 5 Mike Gilbert gentoo-dev 2016-07-27 17:34:42 UTC
(In reply to Anthony Basile from comment #1)
> I don't understand systemd to be honest, so I don't know what to do here.
> 
> Can someone in the systemd team help me out?

Would love to help, but I don't understand tor, and I don't know what capabilities it might need.

https://www.freedesktop.org/software/systemd/man/systemd.exec.html#CapabilityBoundingSet=

If upstream provides the systemd unit, they would be in the best position to fix it.