{"id":22535763,"url":"https://github.com/ik5/gocapng","last_synced_at":"2026-04-21T16:31:39.526Z","repository":{"id":57651043,"uuid":"448369023","full_name":"ik5/gocapng","owner":"ik5","description":"Binding of libcap-ng for golang","archived":false,"fork":false,"pushed_at":"2022-03-13T13:54:56.000Z","size":1534,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T06:22:40.041Z","etag":null,"topics":["go","golang","golang-package","libcap","libcap-ng","linux","posix"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ik5.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-15T19:15:08.000Z","updated_at":"2023-03-04T11:28:46.000Z","dependencies_parsed_at":"2022-09-05T02:51:02.509Z","dependency_job_id":null,"html_url":"https://github.com/ik5/gocapng","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ik5/gocapng","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ik5%2Fgocapng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ik5%2Fgocapng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ik5%2Fgocapng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ik5%2Fgocapng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ik5","download_url":"https://codeload.github.com/ik5/gocapng/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ik5%2Fgocapng/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263061405,"owners_count":23407606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","golang-package","libcap","libcap-ng","linux","posix"],"created_at":"2024-12-07T10:08:28.766Z","updated_at":"2026-04-21T16:31:34.475Z","avatar_url":"https://github.com/ik5.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"gocapng\n=======\n\nThe following code\n-------------------\n\nThe following code provides a (C)Go binding for libcap-ng by Red-Hat using\n__static__ linking.\n\nThe aim of the binding is to provide a Go'ish approach on using libcap-ng's API.\nThe code is only for Linux without a support for any additional OSes.\n\nThe API itself allows to provide to 3rd party execution rights.\n\nThe examples directory provides both the usage, and the actual right\nattributes provided for the executable.\n\nWhat is it all about\n--------------------\n\nThe aim of POSIX's libcap and libcap-ng is to provide elevated permissions for\nspecific type of actions without becoming root, and only open it when required\nand turn it off after performing the call itself.\n\nIn order to bind low port number (bellow 1024) you need to become root, or use\nCAP_NET_BIND_SERVICE with libcap or libcap-ng.\n\nThe difference between libcap and libcap-ng is that libcap-ng is a library that\nprovides helps for taking care of POSIX libcap in simpler manner.\n\n\nBuilding Requirements\n---------------------\n\nEvery executable binary that requires to have capabilities attributes enabled.\n\nThe way to set capabilities is to use `setcap` command that arrive from `libcap`.\n\n```shell\n$ sudo setcap CAP_ .... \u003cexecutable\u003e\n```\n\nWithout using `setcap`, the executable will not gain any required permission.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fik5%2Fgocapng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fik5%2Fgocapng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fik5%2Fgocapng/lists"}