Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paultag/go-modprobe
load and unload kernel modules
https://github.com/paultag/go-modprobe
Last synced: 4 days ago
JSON representation
load and unload kernel modules
- Host: GitHub
- URL: https://github.com/paultag/go-modprobe
- Owner: paultag
- License: mit
- Created: 2018-05-22T17:13:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-24T20:15:21.000Z (12 months ago)
- Last Synced: 2024-12-26T08:10:49.130Z (11 days ago)
- Language: Go
- Size: 19.5 KB
- Stars: 33
- Watchers: 2
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-modprobe
[![Go Reference](https://pkg.go.dev/badge/pault.ag/go/modprobe.svg)](https://pkg.go.dev/pault.ag/go/modprobe)
[![Go Report Card](https://goreportcard.com/badge/pault.ag/go/modprobe)](https://goreportcard.com/report/pault.ag/go/modprobe)Load an unload Linux kernel modules using the Linux module syscalls.
This package is Linux specific. Loading a module uses the `finit` variant,
which allows loading of modules by a file descriptor, rather than having to
load an ELF into the process memory before loading.The ability to load and unload modules is dependent on either the `CAP_SYS_MODULE`
capability, or running as root. Care should be taken to understand what security
implications this has on processes that use this library.## Setting the capability on a binary using this package
```
$ sudo setcap cap_sys_module+ep /path/to/binary
```