Re: Adding CAP_NET_RAW to binaries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/11/17 16:07, nicolas.mailhot@xxxxxxxxxxx wrote:

I'm building the prometheus blackbox exporter that needs the CAP_NET_RAW capability to conduct ICMP probes (I don't want to run it as root)

I've done the naïve
setcap cap_net_raw+ep /builddir/build/BUILDROOT/prometheus-blackbox-exporter-0.10.0-1.fc28.llt.x86_64/usr/bin/prometheus-blackbox-exporter

in the specfile, but that makes mock barf
unable to set CAP_SETFCAP effective capability: Operation not permitted

What is the correct way to handle this?

Set it in the file list with %cap as iputils does for ping etc:

https://src.fedoraproject.org/rpms/iputils/blob/master/f/iputils.spec#_142

Tom

--
Tom Hughes (tom@xxxxxxxxxx)
http://compton.nu/
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux