Allow -DWITH_SETCAP=OFF to disable setcap during make install (#1363)

The debs don't want it (and so this will save needing to patch it out),
nor do you need it if running via a systemd service file that sets the
capabilities.
pull/1360/head
Jason Rhinelander 4 years ago committed by GitHub
parent bbfbc1c1e7
commit 63a876cc78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,7 +35,10 @@ else()
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
install(CODE "execute_process(COMMAND setcap cap_net_admin,cap_net_bind_service=+eip ${CMAKE_INSTALL_PREFIX}/bin/lokinet)")
option(WITH_SETCAP "Enables setcap'ing the lokinet binary with the required capabilities during installation (requires root)" ON)
if(WITH_SETCAP)
install(CODE "execute_process(COMMAND setcap cap_net_admin,cap_net_bind_service=+eip ${CMAKE_INSTALL_PREFIX}/bin/lokinet)")
endif()
endif()
endif()

Loading…
Cancel
Save