Download libcap.so.2
Otherwise it will return -1 and the non-nil error of the callback return value. Advanced user note: if the caller of this function thinks they know what they are doing by using runtime. If said caller needs to run something on the disposable security state thread, they should do it via the launch callback function mechanism.
The Go runtime is complicated and this is why this Launch mechanism provides the optional callback function. SetChroot specifies the chroot value to be used by the launched command. An empty value means no-change from the prevailing value. A nil value means the prevailing vectors of the parent will be inherited. Note, a duplicate of the provided IAB tuple is actually stored, so concurrent modification of the iab value does not affect the launcher.
ModeUncertain etc are how libcap summarizes security modes involving capabilities and secure-bits. GetMode assesses the current process state and summarizes it as a Mode. This function always succeeds. Unfamiliar modes are declared ModeUncertain. Set attempts to enter the specified mode. An attempt is made to enter the mode, so if you prefer this operation to be a no-op if entering the same mode, call only if CurrentMode disagrees with the desired mode.
This function may fail for lack of permission or because some of the Secbits are already locked for the current process. SecbitNoRoot etc are the bitmasks associated with the supported Secbit masks. Set attempts to force the process Secbits to a value. Set is an opaque capabilities container for a set of system capbilities. It holds individually addressable capability Value's for the three capability Flag's.
For admin tasks associated with managing namespace specific file capabilities, Set can also support a namespace-root-UID value which defaults to zero. The format follows the following pattern: a set of space separated sequences.
Each sequence applies over the previous sequence to build up a Set. The format of a sequence is:. The "e", "i" and "p" characters correspond to the capabilities of the corresponding Flag: "e" Effective ; "i" Inheritable ; "p" Permitted. This syntax is overspecified and there are many ways of building the same final Set state. On each of the following lines we give three or more examples of ways to specify a common Set.
String from that Set. GetProc returns the capability Set of the current process. If the kernel is unable to determine the Set associated with the current process, the function panic s. Import imports a Set from a byte array where it has been stored in a portable lossless way. That is values exported by libcap. Cf returns 0 if c and d are identical. A non-zero Diff value captures a simple macroscopic summary of how they differ. The Diff.
Has function can be used to determine how the two capability sets differ. Export exports a Set into a lossless byte array format where it is stored in a portable way. Note, any namespace owner in the Set content is not exported by this function. Note, Export generates exported byte streams that are importable by libcap. Fill copies the from flag values into the to flag. With this function, you can raise all of the permitted values in the effective flag with c.
Fill cap. Effective, cap. FillFlag copies the from flag values of ref into the to flag of c. With this function, you can raise all of the permitted values in the c Set from those in ref with c. Permitted, ref, cap. GetFlag determines if the requested Value is enabled in the specified Flag of the capability Set. Note, Linux does not store the full Effective Flag in the metadata for the file.
Only a single Effective bit is stored in this metadata. This single bit is non-zero if the Effective Flag has any overlapping bits with the Permitted or Inheritable Flags of c. This may appear suboptimal, but the reasoning behind it is sound. Namely, the purpose of the Effective bit it to support capabability unaware binaries that will only work if they magically launch with the needed Values already raised this bit is sometimes referred to simply as the 'legacy' bit.
SetFile attempts to set the file capabilities of the specified filename. Note, see the comment for SetFd for some non-obvious behavior of Linux for the Effective Flag on the modified file.
SetFlag sets the requested bits to the indicated enable state. Any ideas? Improve this question. I think you may need to install the libpcap library, not the libcap library, e. Add a comment. Active Oldest Votes. Try installing linux-headers, but you will need to know your kernel version: Ex. Done Building dependency tree Reading state information Done linux-headers Improve this answer.
The next major release will be 5. Meanwhile no new code with the legacy macros will be accepted. This tcpdump release requires libpcap 1. Version: 1. The current development versions are freely accessible through the GitHub Git hosting site tcpdump , libpcap. You can clone these repositories with the following commands:.
A read-only git mirror of all project repositories is available here in case anyone needs it. There is various continuous integration involved in the development process. Please use GitHub as follows:. Upgrade to the latest libpcap API 1. Add support for Linux x Minor setup improvements. Updates of tests. Improve and simplify setup and packaging. Improve and update tests. Download files Download the file for your platform.
Files for libpcap, version 1. Close Hashes for libpcap File type Source. Python version None. Upload date Jan 10, Hashes View. File type Wheel.
0コメント